You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Doug Davis <du...@us.ibm.com> on 2001/12/10 12:36:25 UTC
Re: Urgent - Help required
Can you send the stacktrace from the client?
-Dug
jeelani basha <s_...@yahoo.com> on 12/09/2001 11:08:14 PM
Please respond to axis-user@xml.apache.org
To: axis-user@xml.apache.org
cc:
Subject: Urgent - Help required
Hi,
I am in the mid of a prototype that I am building
using Axis on Tomcat 4.0. I was able to run everything
smoothly using the alpha-2 release. But now when I am
using alpha-3, I am facing some problems. I even
downloaded the jar files of 6th-dec-2001 build and
tried.
I deployed a simple service which accepts custom type
input parameters. The deployment descriptor is as
shown below:
deploy.wsdd:
---------------
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="urn:creditService"
provider="java:RPC">
<parameter name="className" value="CreditService"/>
<parameter name="methodName" value="getCredit"/>
<beanMapping qname="myNS:account"
xmlns:myNS="urn:creditService"
languageSpecificType="java:AccountBean"/>
</service>
</deployment>
I am able to deploy the service and can found that the
service is being added to the server-config.wsdd file.
But when I access the service, I am getting
"NullPointerException" at the client side. No
exception is displayed on the tomcat console.
The clien program code is as shown below:
------------------------------------
Service service = new Service();
//Create a Call object and set the parameterss
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new
java.net.URL("http://localhost:8080/axis/services/urn:creditService"));
call.setOperationName("getCredit");
call.setProperty(Call.NAMESPACE,"urn:creditService");
//Create the customer object to set first and last
names
AccountBean account = new AccountBean();
account.setAccountNumber("123213");
// Register the Customer class
QName qn = new QName("urn:creditService",
"AccountBean");
Class cls = AccountBean.class;
call.addSerializer(cls, qn, new
org.apache.axis.encoding.BeanSerializer(cls));
// Set the input parameter to Call object
call.addParameter( "arg1", new XMLType(qn),
Call.PARAM_MODE_IN );
//Invoke the service to get the response message as
String object
String response = (String) call.invoke( new Object[]
{ customer } );
------------------------------------------
The same code works fine with alpha-2 release.
Please help me?.
Thanks and Best Regards,
Jeelani
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com