• 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

How to create WS client automatically in Axis2

 
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am a newbie in Web Service. I am facing a problem in creating web service client.
Actually I have a .wsdl file refering to many .xsd.
When I am trying to create the client using bottom up approach I am getting confused to create the response because it is not visible which DTO puts the input parameters.

Please tell how to understand which DTO will set the parameters.

For example in AddMember.java shown below how do I know which method sets the I/P params (memberId , programCode,
tierLevel etc.).
Please suggest whether I can create the below class automatically in Axis2 , if not then where can I get the mapping of params with DTO.



 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Generally one would use the wsdl2java tool to create client code to access a given WS.
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the command for you -

java -classpath "c:\dev\axis.jar"; org.apache.axis.wsdl.WSDL2Java
<wsdl-path> -N<Namespace> -oC:/<output dir> -v


Enjoy
 
Kousik Majumder
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

java -classpath "c:\dev\axis.jar"; org.apache.axis.wsdl.WSDL2Java
<wsdl-path> -N<Namespace> -oC:/<output dir> -v


What you have suggested is related to Axis2 ?
If so then why am I using axis.jar?
If not then can I do the same thing using Axis2 ?
 
Kacee Saxena
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, it should be possible with Axis2. Please try and let us know in case there is a problem.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kousik Majumder wrote:If so then why am I using axis.jar?


Are you asking us why you are doing the things you're doing?

But seriously, run -don't walk- to upgrade to Axis 2. Axis 1 is way obsolete.
 
Kousik Majumder
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I used the below command:-



It created all the DTO's and other classes separately that is in MembershipSoapServiceStub class.

But I did not find the client code in neither case.
 
reply
    Bookmark Topic Watch Topic
  • New Topic