wood burning stoves 2.0*
The moose likes Web Services and the fly likes Need to Generate java code from wsdl (JAX-RPC) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "Need to Generate java code from wsdl (JAX-RPC)" Watch "Need to Generate java code from wsdl (JAX-RPC)" New topic
Author

Need to Generate java code from wsdl (JAX-RPC)

Ganesh Gowtham
Ranch Hand

Joined: Mar 30, 2005
Posts: 225

Hi ,

I need to generate the java code from WSDL (JAX-RPC) ,

Could you folks suggest some good tool like axis uses (Wsdl2Java )
i am searching similar kind class .

in net i saw External Link helpfull .

but in wscomplie downloading page i cant able to find what to download .

Please do help


Thanks, Ganesh Gowtham
http://ganesh.gowtham.googlepages.com
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Originally posted by Gowtham Ganamukala:
External Link helpfull .

but in wscomplie downloading page i cant able to find what to download.


wscompile would be part of the Part of the SQL Anywhere development installation.

Personally I would advise against deploying a web service inside a database or calling a web service from inside a database (usually support for these kinds of features are short-lived fads on DB servers). Usually collocating the service/client on the same server instance (but outside of the DB server) is better - that way you'll have less headaches when you need to migrate to the next version of the DB server and support for your "niche" feature (at least in the DB world) has been dropped.
Ganesh Gowtham
Ranch Hand

Joined: Mar 30, 2005
Posts: 225

Hi Peer ,
thanks for reply the post in JavaRanch .

i have given WSDL file , service is being exposed with JAX-PRC (IBM's)
so intially i need to create the stub,skeleton for accesing the service .
so i need to generate the java classes for the same
so i found wscomplie will do ....
when i tried to create with axis2 , all i got is so weired ..... clases get generated .
any clues will b helpful.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Originally posted by Gowtham Ganamukala:
when i tried to create with axis2 , all i got is so weired ..... classes get generated.


You cannot expect to get the classes that exist on the server - there simply isn't enough information in a WSDL. The classes that you do get are the "pieces" that you need to build the requests that can be sent to the service - other "pieces" are used to hold the information that was contained in the response form the service.

The Client Sample from Axis Data Binding (ADB) actually shows a fairly simple model:

  • - Initialize a "{operation_name}Request" object with the required information
  • - Submit the Request to the web service by calling "stub.{operation_name}( {operation_name}Request )"
  • - Use the accessors of the returned "{operation_name}Response" instance to obtain the information required.


  • Axis2 WSDL2Java Option Reference

    There are some extension options available for ADB Integration With Axis2. For example "WSDL2Java ... -Ew true" enables ADBs "Wrapped Mode"

    Notice that ADB has three generation modes. "Expanded Mode" creates a bean for each top level XML element and each complex XML type (easily doubling the number of classes that you would have seen under Axis 1.x) used in the SOAP payload. I suspect that "Expanded Mode" is the one that WSDL2Java uses by default - using the extension option "-Ew true" on WSDL2Java will probably place it into "Wrapped Mode" which will limit the number of classes that are generated.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Need to Generate java code from wsdl (JAX-RPC)