• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

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

 
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
     
    reply
      Bookmark Topic Watch Topic
    • New Topic