[Version 5.0.2 and later]Developing client bindings from a WSDL file

Before you begin

To develop the client bindings from a Web Services Description (WSDL) file, you must obtain the Uniform Resource Locator (URL) of the WSDL file to use.

If it is a local file and you are running the Windows platform, the URL looks like this: file:drive:\path\file_name.wsdl. If you are using the UNIX platform, the URL looks like this: file:/path/file_name.wsdl. You can also specify local files using the absolute or relative file system path.

Client bindings are generated using the -role develop-client option in combination with the -container option of the WSDL2Java command. The -container option takes the following parameters:

Why and when to perform this task

To develop client bindings from a WSDL file:

Steps for this task

  1. Run the WSDL2Java -verbose -role develop-client -container type wsdlURL command.

    Where type is ejb for an enterprise JavaBean (EJB) client, web for a Java bean client, or client for an application client.

    Note: You can have:

    • -container web
    • -container ejb
    • -container client

    Since the verbose option is specified, a list of all generated files is displayed when the command runs.

Results

The bindings and deployment descriptors needed by a client to use a Web service.

Example

The following example uses an enterprise bean named AddressBook and a WSDL file named AddressBook.wsdl. After generating the bindings from the WSDL2Java -verbose -role develop-client -container client AddressBook.wsdl command, the following files are generated:

Parsing XML file:  file:e:/example/app/topdown/step1/AddressBook.wsdl 
WSWS3185I: Info: Parsing XML file:  AddressBook.wsdl
WSWS3282I: Info: Generating addr\Address.java.
WSWS3282I: Info: Generating addr\Phone.java.
WSWS3282I: Info: Generating addr\StateType.java.
WSWS3282I: Info: Generating addr\AddressBook.java.
WSWS3282I: Info: Generating addr\AddressBookService.java.
WSWS3282I: Info: Generating META-INF\webservicesclient.xml.
WSWS3282I: Info: Generating META-INF\ibm-webservicesclient-bnd.xmi.
WSWS3282I: Info: Generating META-INF\AddressBook_mapping.xml.
WSWS3282I: Info: Generating META-INF\ibm-webservicesclient-ext.xmi.

What to do next

Complete the client implementation.

Assemble a Web services-enabled client JAR and EAR file.

Related tasks
Developing Web services clients based on Web Services for J2EE



Searchable topic ID:   twbs_devclientbindings
Last updated: Jun 21, 2007 4:12:58 PM CDT    WebSphere Application Server Express, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.exp.doc/info/exp/ae/twbs_devclientbindings.html

Library | Support | Terms of Use | Feedback