Two Laptop Bag
The moose likes Web Services and the fly likes WSDL2JAVA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "WSDL2JAVA" Watch "WSDL2JAVA" New topic


Mortin kim
Ranch Hand

Joined: Nov 15, 2007
Posts: 44
I am trying to invoke one webservices.
What i have is wsdl file,By using this i need to generate JAVA stubs.
for that do i need to use wsdl2java command.
can any one tell me the steps to generate java stubs using wsdl2java command using AXIS 1.4 api.

Thanks for your time.
Peer Reynders

Joined: Aug 19, 2005
Posts: 2933
3. WSDL2Java: Generate the Server-side Wrapper Code and Stubs For Easy Client Access
Pavel Cherkashin
Ranch Hand

Joined: Mar 04, 2005
Posts: 47
wsdl2java is a tool included in most Java Web Service Implementation (Sun's, Axis'es etc). The tool is usually released as command line program (bat, sh). Generally speaking, the same tools often released as ANT tasks too.
To generate java stubs the wsdl file can be downloaded and saved locally, or pointed as accessible resource (URL). The path (or url) to wsdl file goes as a required parameter for tool. Rest of parameters - folder where to place generated java sources, java package for these sources, and a number of params with minor meaning, which help to customize the result.
Given description can be considered as a short description of tool and targeted usage. More detailed information can be reached by calling particular tool (Axis'es or Sun's or other) with help flag or without parameters(by default they usually draw help info).

Pavel Cherkashin - <br />SCJP, SCWCD, SCDJWS, SCBCD, SCEA, ...<br />
I agree. Here's the link:
subject: WSDL2JAVA
jQuery in Action, 3rd edition