Fast WS Tools for C/C++ - Details
Building a Web Services Application
The following diagram demonstrates how a complete Web Services application is created using the various components of the OSS FWS Tools.
The OSS FWS compiler takes an WSDL 1.1 service description as input, and generates header and control table files. The compiler supports both document/literal and RPC/literal service descriptions as mandated by the WS-I Profile. The generated header file contains C type definitions for the application-specific content of the SOAP messages described in the WSDL file. The control table file contains internal information required by the OSS FWS Runtime component to serialize/parse SOAP messages.
It is typical for SOAP toolkits to map operations defined in the WSDL file to the functions of the target language. The FWS compiler can optionally generate the following client and server side functions for a WSDL operation.
- Create a SOAP request envelope C structure from the input parameters of an operation
- Create a serialized SOAP request message from the input parameters of an operation
- Extract output parameters of the operation from a SOAP response envelope C structure
- Extract output parameters of the operation from a serialized SOAP response message
- Create and send a SOAP request message to the server using transport protocol
- Receive a SOAP response message using transport protocol and extract its output parameters
- Create and send a SOAP request message to the server and receive (client waits for the response in a blocking mode) its response from the server using transport layer protocol
- Extract input parameters of an operation from a SOAP request envelope C structure
- Extract input parameters of an operation from a serialized SOAP request message
- Create a SOAP response envelope C structure from the output parameters of an operation
- Create a serialized SOAP response message from the output parameters of an operation
Many other features are available in the FWS compiler. For example, support for a helper API; generation of C++ - conformant code; varying levels of diagnostics; and additional output files (such as pretty-printed WSDL listings).
The OSS FWS Runtime library is a collection of functions for use in writing efficient Web Services applications in C and C++. The library contains:
- Web Services initialization and terminating functions to allow loading (statically and dynamically) /releasing of the Web Services control tables, and to support multiple Web Services in an application
- Serialization of Envelope C structures to Fast and XML SOAP messages (both version 1.1 and 1.2)
- Parsing of the XML and Fast SOAP messages. The parser can invoke user-provided callback functions for each header block and body/fault to perform application-specific actions, and to control the parser to achieve the best performance. Both versions of SOAP messages, 1.1 and 1.2 (detected automatically), are supported
- Creation of output SOAP message while parsing the input message. Some components (header blocks, body/fault, and/or application messages) of the input message can be relayed as they are, without decoding, while other components can be modified inside the callback functions and added to the output message. This functionality is useful for writing efficient intermediary SOAP nodes
- Conversion of XML SOAP messages into Fast SOAP messages and vice versa
- Helper functions to create, access and modify the Envelope C structure and its components (header blocks, body, and fault content), and auxiliary functions providing access to various features such as relaxed SOAP processing
The functionality of encoding, decoding, copying, comparing, freeing the application-specific messages, changing the XML namespace prefixes, compression with Zlib, support for file and socket input/output etc. is also available to your Fast Web Services applications.
FWS Transport Layer
The OSS-provided transport-layer runtime library can be used to send and receive SOAP messages. It encapsulates all transport protocol-related functionality. The FWS application code is transport-independent; for example, the same Web Service can be used as a CGI module, or as a standalone Server. It is simply a matter of using a different transport mechanism. The OSS FWS Transport Layer supports SOAP HTTP(S) bindings with implementations of:
- HTTP client
- Simple standalone HTTP server
- CGI wrapper
- Fast CGI wrapper
Transport layers use a simple, open and documented API. You can plug-in your own transport layer if you don't wish to use the generic implementation of HTTP provided by OSS.
For more information, contact us at 1-888-OSS-2761 (USA and Canada only), +1-732-302-9669 (international), or email@example.com .