Using WSDL2Java to generate a proxy client

WSDL2Java is a command-line tool that generates a proxy client. A proxy client make it easier to program client applications.

Before you begin

Before generating a proxy client, you must have previously exported the WSDL files that describe the business process or human task Web services APIs from the WebSphere® environment (or the WebSphere Process Server client CD) and copied them to your client programming environment.

Why and when to perform this task

Steps for this task

  1. Use the WSDL2Java tool to generate a proxy client: Type:

    wsdl2java options WSDLfilepath

    Where:

    • options include:
      -noWrappedOperations (-w)
      Disables the detection of wrapped operations. Java™ beans for request and response messages are generated.
      Note: This is not the default value.
      -role (-r)
      Specify the value client to generate files and binding files for client-side development.
      -container (-c)
      The client-side container to use. Valid arguments include:
      client
      A client container
      ejb
      An Enterprise JavaBeans™ (EJB) container.
      none
      No container
      web
      A Web container
      -output (-o)
      The folder in which to store the generated files.

      For a complete list of WSDL2Java parameters, use the -help command line switch, or refer to the online help for the WSDL2Java tool in the WID/RAD.

    • WSDLfilepath is the path and filename of the WSDL file that you exported from WebSphere environment or copied from the client CD.
    The following example generates a proxy client for the Human Task Activities Web services API:
    call wsdl2java.bat -r client -c client -noWrappedOperations 
                       -output c:\ws\proxyClient  c:\ws\bin\HTMWS.wsdl
  2. Include the generated class files in your project.
Related tasks
Creating a client application (Java Web services)

(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)