-
Web service
Hi,
I have written a web service and it is deployed successfully.But not able to call from web service client using stub.I have usen weblogic 10 MP2,Axis2 1.5.
[INFO] Unable to sendViaPost to url[http://10.227.76.116:7001/GenericWeb...tomerProfile/]
org.apache.axis2.AxisFault: customer cannot be null!!
at org.apache.axis2.AxisFault.makeFault(AxisFault.jav a:430)
at org.apache.axis2.transport.http.SOAPMessageFormatt er.writeTo(SOAPMessageFormatter.java:83)
at org.apache.axis2.transport.http.AxisRequestEntity. writeRequest(AxisRequestEntity.java:84)
at org.apache.commons.httpclient.methods.EntityEnclos ingMethod.writeRequestBody(EntityEnclosingMethod.j ava:499)
at org.apache.commons.httpclient.HttpMethodBase.write Request(HttpMethodBase.java:2114)
at org.apache.commons.httpclient.HttpMethodBase.execu te(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.e xecuteWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.e xecuteMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMe thod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMe thod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender .executeMethod(AbstractHTTPSender.java:542)
at org.apache.axis2.transport.http.HTTPSender.sendVia Post(HTTPSender.java:199)
at org.apache.axis2.transport.http.HTTPSender.send(HT TPSender.java:76)
at org.apache.axis2.transport.http.CommonsHTTPTranspo rtSender.writeMessageWithCommons(CommonsHTTPTransp ortSender.java:400)
at org.apache.axis2.transport.http.CommonsHTTPTranspo rtSender.invoke(CommonsHTTPTransportSender.java:22 5)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine .java:435)
at org.apache.axis2.description.OutInAxisOperationCli ent.send(OutInAxisOperation.java:402)
at org.apache.axis2.description.OutInAxisOperationCli ent.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(Op erationClient.java:165)
at com.pfizer.epf.customerprofile.services.CustomerPr ofileStub.updateCustomer(CustomerProfileStub.java: 373)
at com.pfizer.epf.customerprofile.services.TestClient .main(TestClient.java:468)
Caused by: org.apache.axis2.databinding.ADBException: customer cannot be null!!
at com.pfizer.epf.customerprofile.services.CustomerPr ofileStub$UpdateCustomer.serialize(CustomerProfile Stub.java:39940)
at com.pfizer.epf.customerprofile.services.CustomerPr ofileStub$UpdateCustomer.serialize(CustomerProfile Stub.java:39886)
at com.pfizer.epf.customerprofile.services.CustomerPr ofileStub$UpdateCustomer$1.serialize(CustomerProfi leStub.java:39874)
at org.apache.axis2.databinding.ADBDataSource.seriali ze(ADBDataSource.java:93)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl .internalSerializeAndConsume(OMSourcedElementImpl. java:738)
at org.apache.axiom.om.impl.llom.OMElementImpl.intern alSerialize(OMElementImpl.java:966)
at org.apache.axiom.om.impl.llom.OMElementImpl.intern alSerializeAndConsume(OMElementImpl.java:995)
at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.s erializeInternally(SOAPEnvelopeImpl.java:254)
at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.i nternalSerialize(SOAPEnvelopeImpl.java:242)
at org.apache.axiom.om.impl.llom.OMElementImpl.intern alSerializeAndConsume(OMElementImpl.java:995)
at org.apache.axiom.om.impl.llom.OMNodeImpl.serialize AndConsume(OMNodeImpl.java:486)
at org.apache.axis2.transport.http.SOAPMessageFormatt er.writeTo(SOAPMessageFormatter.java:79)
... 19 more
I will appriciate for ur help.
-
Need more info about problem.
For a start you have to describe
format of messages and arguments that client and server exchange.
Somewhere in your stub on client there will be server call method with INVOKE of some operation that server exposes.
I guess one of the arguments of that method is your 'customer',
which you have to create somewhere in your app logic
and pass to server in this method, so it can be put in INVOKE object array
Find this line of code in stub
and see method's arguments
Code:
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {client});
then use debugger to see what is going on.
-
The WSDL would be useful. I tried to download yours from here:
http://10.227.76.116:7001/GenericWeb...rProfile/?wsdl but your site was having none of it.
The first line is the one I would investigate first..
Code:
org.apache.axis2.AxisFault: customer cannot be null!!
-
At a guess you are calling updateCustomer() with a null customer. AT least that's the best guess with the limited information you've given us.