aspose file tools*
The moose likes Web Services and the fly likes Client for Axis2 POJO webservice giving error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Client for Axis2 POJO webservice giving error" Watch "Client for Axis2 POJO webservice giving error" New topic
Author

Client for Axis2 POJO webservice giving error

Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
I have a WSDL from which I generated the Java Axis2 code (contract first approach). Code was generated using eclipse. Once the skeleton code was generated I filled in the methods with my business logic.
I have craeted an .aar file and deployed this service on tomcat. I am able to see the service from
http://localhost:8080/axis2/services/listServices
and also able to view the wsdl from
http://localhost:8080/axis2/services/ResumeService?wsdl

Here is the wsdl



Now I need to create the client code. I did so using Eclipse. Eclipse created "ResumeServiceCallbackHandler.java" and "ResumeServiceStub.java". Then I created the "ResumeClient" class and did the following



I intend to call the "getResumeDetails" method of service and pass the resume id as parameter. But it is giving me an error


Can someone please guide me as to how to proceed?

Thank you
Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
Even if I try to run the service using soapUI, I get the same error message.

Seems the problem is with the Service and not the client.

Any clue as to what could be the issue?

Thank you
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
So instead of getting response message your service is returning fault. And axis is returning axis fault exception corresponding to fault in response. I suspect following:


In response of your service is returning null as address and which axis not able to map. Lets modify your schema and deploy your service again. Hope issue will get fixed.



SCJP 1.5(97%) My Blog
Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
Thanks for replying.

I made the suggested changes but still getting the same error.

Here is my updated WSDL

shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
OK. Have you deployed the service again after modifying the WSDL. i.e generate classes do packaging as aar etc. For time being just remove address element and see.

If its working then we can be sure that address element was the culprit.
Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
Thanks a lot.
You were absolutely right. the problem was with the address. Although I had changed the wsdl but I had not changed the skeleton code to populate the address. Now I am setting the address in skeleton and it is resolved.

Thanks for the help.
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
Welcome
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Client for Axis2 POJO webservice giving error