A Web service consists of one or more methods that share a common point of reference, and that can synchronously communicate, using Simple Object Access Protocol (SOAP) protocols, with other similarly enabled applications.
IBM® Web Services Client for C++ (WSCC) provides a set of libraries and Java™ tools that enable you to build C++ Web service client applications from existing Web Service Description Language (WSDL) files. These applications are able to communicate over Hypertext Transfer Protocol (HTTP) with other applications that are configured in a similar way, using transmission control protocol/internet protocol (TCP/IP) with SOAP protocols.
Web services are based on files called WSDLs, which are XML files containing all the information relating to services that are available at a particular location on the internet. At their simplest level, WSDLs describe request/response message pairs in detail, and contain everything relevant to the service.
A Java program, WSDL2Ws, which is part of the Web Services Client for C++ package, is used to turn the WSDL into a suite of C++ stubs and data objects that you can call and pass information to, and that request information from the server and then wait for the corresponding reply before passing the response data objects back to the client. The stubs hide the internet communication from the application writer. All you need to know is the name of the service, the method it contains, and the structure of any data objects that are passed.
The most common use of Web Services Client for C++ is to create a WSDL source file that describes the communication between the client and server, and then use the WSDL2Ws tool to generate stubs that you can use to communicate with the Web service server.
The following diagrams describe the actions that are required
to turn a WSDL into a Web service. Figure 1 illustrates the first step, which
is to convert the WSDL into a set of C++ client stubs that can be called by
the client application:
As shown in Figure 2,
the client application calls a method on a service in the stubs. This method
calls a number of underlying methods in the AxisClient library, which generates
the SOAP message that communicates with the server:
You can add Web service
handlers to the AxisClient library to allow further processing of the SOAP
message, either before it is transmitted to the server or after the corresponding
reply has been received from the server. The Web Service Deployment Descriptor
(WSDD) file controls how handlers are used. Figure 3 is an amended version
of Figure 2, showing how handlers can be hooked into the AxisClient library:
For more detailed explanations and examples, see the docs sub-directory in the install directory for Web Services Client for C++, which is /QIBM/ProdData/xmltoolkit/wscc-1.0-OS400.