• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Client for Axis2 POJO webservice giving error

 
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 279
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.


 
Anjali S Sharma
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for replying.

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

Here is my updated WSDL

 
shivendra tripathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 279
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome
 
reply
    Bookmark Topic Watch Topic
  • New Topic