Results 1 to 4 of 4

Thread: Web service

  1. #1
    mousumidas is offline Member
    Join Date
    Jan 2010
    Posts
    7
    Rep Power
    0

    Angry 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.

  2. #2
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    368
    Rep Power
    5

    Default

    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

    Java Code:
    java.lang.Object _resp = _call.invoke(new java.lang.Object[] {client});
    then use debugger to see what is going on.

  3. #3
    RogerP is offline Member
    Join Date
    Jan 2010
    Location
    UK
    Posts
    9
    Rep Power
    0

    Default

    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..
    Java Code:
    org.apache.axis2.AxisFault: customer cannot be null!!

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,945
    Rep Power
    19

    Default

    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.

Similar Threads

  1. how to call service method inside another service
    By kirtichopra2003 in forum Web Frameworks
    Replies: 1
    Last Post: 10-24-2009, 02:19 AM
  2. web service mtom
    By fiqueudrue in forum NetBeans
    Replies: 0
    Last Post: 02-10-2009, 09:16 AM
  3. Problem of Web Service
    By nihongbin in forum XML
    Replies: 1
    Last Post: 12-11-2008, 04:20 AM
  4. Web Service from JSP
    By Eric in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 07-02-2007, 05:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •