WebSphere Web Services Client for C++, Version 1.0.1 Operating Systems: Linux, Solaris

Client API

The AxisClient API provides further methods in addition to those methods that the client stubs use. Examples of ways in which you might use these further methods include for adding proxy information to a web service, and for applications that initialize multiple stubs or calls.

Although the quickest way of creating web service client applications is to start with a WSDL and use WSDL2Ws to create the client stubs, the methods that the stubs use are only a part of the available AxisClient API. For more information about all the methods that the AxisClient API provides, open the file index.html in the api sub-directory within the <inst_dir>/docs parent directory.

The following sections provide some examples of ways in which you can use methods that the AxisClient API provides.

Proxy information for a web service

An example of how you might want to build on the Stock Quote sample referred to in this documentation is by adding proxy information to the web service. To do this, you must add the following lines of code after creating the web service object and before calling any web service methods:

// If your network requires the use of a proxy, then add the following line of
// code to configure AxisClient.
/*
char *  pszProxyURL = "<ProxyHost>";
int     iProxyPortNumber = <ProxyPort>;

pwsStockQuote->setProxy( pszProxyURL, iProxyPortNumber);
*/

Axis::initialize and Axis::terminate

Applications that initialize multiple stubs or calls before using them must call Axis::initialize() before calling any Web Services Client for C++ methods, and must call Axis::terminate after the last call to a Web Services Client for C++ method.

Applications that use Web Services Client for C++ in multiple threads must also use Axis::initialize and Axis::terminate.


Concept topic

Terms of Use | Rate this page

Timestamp iconLast updated: 12 Dec 2005
(C) Copyright IBM Corporation 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)