WebSphere Message Service Clients: Web Services Client for C++, Version 1.1 Operating Systems: Linux, Windows

Creating client stubs

Before you can create a web service client application, you must first generate the client stubs using the WSDL2Ws tool.

Before you begin

It is assumed that the WSDL that you are using to create client stubs is valid and well formed.

Why and when to perform this task

The steps below use an example WSDL that comes from the installation Web Services Samples provided with WebSphere Application Server (Version 5.0 or later). This very simple sample provides a good introduction to using WSDL2Ws.

To generate the client stubs from your WSDL source file, complete the following steps.

Steps for this task

  1. Change the directory to the one in which you want to build the client stubs, for example, <inst_dir>/samples/getQuote.
  2. Run the WSDL2Ws tool to generate the client stubs. To do this, use a command as shown in the following example, which creates the stubs in the <inst_dir>/samples/getQuote directory.
    java –classpath <inst_dir>/WSDL2Ws/wsdl2ws.jar;
    <inst_dir>/prereqs/java/axis.jar;<inst_dir>/prereqs/java/commons-discovery.jar;
    <inst_dir>/prereqs/java/commons-logging.jar;<inst_dir>/prereqs/java/jaxrpc.jar;
    <inst_dir>/prereqs/java/saaj.jar;<inst_dir>/prereqs/java/wsdl4j.jar 
    org.apache.axis.wsdl.wsdl2ws.WSDL2Ws GetQuote.wsdl 
    -omyGetQuote -sclient

Result

The stubs from GetQuote.wsdl are generated in the sub-directory myGetQuote, which is within the <inst_dir>/samples/getQuote parent directory. If you leave them in this directory, they will be ready for you to use when working through the instructions in Coding and building client applications.

What to do next

Now that the C++ stubs have created, you can begin coding and building a client application.
Related concepts
WSDL2Ws tool
Client API

Task topic

Terms of Use | Rate this page

Last updated: 25 Jan 2006

© Copyright IBM Corporation 2005, 2006. All Rights Reserved.