OpenSOAP Logo

OpenSOAP Project
The Middleware as Platform for IT Application Services

Menu

-Top
-About OpenSOAP
-Releases
-Documentation

-Download
-Contributors
-Link

-FAQs
-Known Bugs
-Roadmap

-Search
-Contact
-Bugzilla

Japanese version

OpenSOAP Architecture

OpenSOAP Architecture Outline

The architecture of OpenSOAP is illustrated by the following diagram.

OpenSOAP Architecture

In general, OpenSOAP is made up of the following 3 components

The Client API, in combination with the Client System, generates a SOAP request message(Envelope), calls a Service(Invoke) and interprets the SOAP response message. The called Service(Endpoint) can be any SOAP compatible Server.

The OpenSOAP Server reads the method from the SOAP message received by the TransportInterface and passes it to the appropriate service program. Depending on the circumstances, it may be forwarded to another OpenSOAP Server, or spool a response message, and supports asynchronous connection with the Client.

The Service API allows an existing service system to become a Web Service, by connecting to an OpenSOAP Server or by operating independently. The Service API receives a SOAP request message, interprets it, and supports the generation of a SOAP response message.

Also, the OpenSOAP security features support access to Certification Authority (Public Key Acquisition, Registration), and make it possible to implement an independent Certification Authority.

Client API

The Client API is provided as a C Language library.

After the OpenSOAP package has been installed with the default settings, when compiling new service programs, /usr/local/include has to be added to the include path and /usr/local/lib has to be added to the library path. At compile time, the library -lOpenSOAPClient must be specified for the service programs.
Moreover, for shared library systems, /usr/local/lib must be added to the runtime library search path.

OpenSOAP ver1.0, using the Client API OpenSOAPTransport, can both send and receive messages conforming to the HTTP1.0 standard.

Please refer to the Programming Guide for details on how to program with the OpenSOAP Client API.

Service API

The Service API is provided as a C Language library. It is an extension of the Client API, and also contains an API for service access and registration.

OpenSOAP API Structure

After the OpenSOAP package has been installed with default settings, when compiling new service programs, /usr/local/include has to be added to the include path and /usr/local/lib has to be added to the library path. At compile time, the libraries -lOpenSOAPService -lOpenSOAPClient must be specified for the service programs.
Moreover, for shared library systems, /usr/local/lib must be added to the runtime library search path.

The OpenSOAP Service API can operate in "StdIO mode" for communication with the OpenSOAP Server through standard input/output or through the inetd service, or in "cgi mode" through a CGI supported HTTP server such as Apache.

Please refer to the Programming Guide for details on how to program with the OpenSOAP Service API.

OpenSOAP Server

The OpenSOAP Server supports many practical Client/Service applications.
Moreover, the OpenSOAP Server has functions for asynchronous connections for services requiring significant processing times, service search or service requests requiring to be forwarded through firewalls, and those services requiring validation of the OpenSOAP Server.

OpenSOAP Server Transport Interface

The OpenSOAP Server has an independent transport interface.
Ver1.0 is a CGI composed transport interface (soapInterface.cgi), and requires a CGI supported HTTP server, such as Apache in order to function.

Service Registration

With OpenSOAP Server Ver1.0, it is possible, using standard I/O or through a socket, to connect to a service.
When constructing a service program using the OpenSOAP Service API, it is required to use the StdIO mode.
SSML(SOAP Service Mapping Language)contained in the OpenSOAP configuration file directory specifies how to connect a service program to the OpenSOAP Server.
When connecting using standard input/output, the service program location and options are specified in SSML. Furthermore, when connecting through a socket, the service program must be registered as an inetd service.
Please refer to this document for information on how to register an inetd service and for a detailed description of SSML.

Asynchronous Processing

In the OpenSOAP specification, once a request has been accepted, the Client session is disconnected while the service processing is performed. When processing is completed, the processing result is spooled inside the Server until the Client, through polling the Server, receives the response of the processing result. This is asychronous processing.
When the OpenSOAP Server receives an asychronous process request message from the Client, the request is given a unique message ID, and only this message ID is returned as a response message to the Client.
The Client receives a message containing this unique message ID from the OpenSOAP Server. On connecting to the Server, and finding a relevant response message in the Server spool indicating that processing has been complete, that response message is returned to the Client.

Below is listed a request message header that illustrates this. The OpenSOAP Server reads this header and performs asynchronous processing.

  <SOAP-ENV:Header>
    <opensoap-header:opensoap-header-block 
    xmlns:opensoap-header="http://header.opensoap.jp/1.0/">
      <opensoap-header:ttl opensoap-header:type="second">80</opensoap-header:ttl>
      <opensoap-header:async>true</opensoap-header:async>
    </opensoap-header:opensoap-header-block>
  </SOAP-ENV:Header>

The following illustrates an example of a message ID returned from the OpenSOAP Server.

<?xml version="1.0" encoding="EUC-JP"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
encodingStyle="http://schemas.xml.soap.org/soap/encoding/">
  <SOAP-ENV:Header>
    <opensoap-header:opensoap-header-block 
    xmlns:opensoap-header="http://header.opensoap.jp/1.0/">
      <opensoap-header:message_id>
        Add.linux.opensoap.jp.2002102415243800001
      </opensoap-header:message_id>
    </opensoap-header:opensoap-header-block>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body/>
</SOAP-ENV:Envelope>

Intra-Server Forwarding

The OpenSOAP specification realizes the concept of forwarding the message to the appropriate Server(Intra-Server forwarding).
The OpenSOAP Server, when it receives a message that it does not have a method for, namely a SSML file without a relevant description then the OpenSOAP Server forwards the message to another known OpenSOAP server.
The forwarding location can be specified in the Server default configuration file (refer here), or can be specified by the Client in the message through restrictions on the forward path or no. of forwardings allowed.
(If both forwarding limit and forward path restrictions are used, the forward path restriction takes precedence)

Below are listed some request message headers that illustrate these cases. The OpenSOAP Server reads these headers and performs the necessary forwarding.

Specifying a limit to the number of forwardings allowed

  <SOAP-ENV:Header>
    <opensoap-header:opensoap-header-block 
    xmlns:opensoap-header="http://header.opensoap.jp/1.0/">
      <opensoap-header:ttl opensoap-header:type="second">80</opensoap-header:ttl>
      <opensoap-header:async>false</opensoap-header:async>
      <opensoap-header:forwarder>
        <opensoap-header:hopcount>2</opensoap-header:hopcount>
      </opensoap-header:forwarder>
    </opensoap-header:opensoap-header-block>
  </SOAP-ENV:Header>

Specifying a forward path

  <SOAP-ENV:Header>
    <opensoap-header:opensoap-header-block 
    xmlns:opensoap-header="http://header.opensoap.jp/1.0/">
      <opensoap-header:ttl opensoap-header:type="second">80</opensoap-header:ttl>
      <opensoap-header:async>false</opensoap-header:async>
      <opensoap-header:forwarder>
        <opensoap-header:forward_path>
          http://fwdhost0.opensoap.jp/cgi-bin/soapInterface.cgi
        </opensoap-header:forward_path>
        <opensoap-header:forward_path>
          http://fwdhost1.opensoap.jp/cgi-bin/soapInterface.cgi
        </opensoap-header:forward_path>
      </opensoap-header:forwarder>
    </opensoap-header:opensoap-header-block>
  </SOAP-ENV:Header>


Copyright (C) 2001-2004 Webmasters of www.opensoap.jp. All Rights Reserved.