William Byrne / WilliamB@ByrneLitho.com
An experimental OpenACS SOAP package that may prove itself useful.
Developed using the following system configuration:
The soap-gateway is a compilation of server side tcl procedures and pages that provide Remote Procedure Call (RPC) capabilities to OpenACS servers for clients using SOAP/HTTP. The implementation is relatively small and maintains minimal conformity to current SOAP specifications. This document describes the basic implementation.
The Simple Object Access Protocol (SOAP) v1.1 was submitted to W3C on April 18, 2000. Its compatriot Web Services Description Language (WSDL) was submitted on March 14, 2001. Together they attempt to unify diverse systems using a form of XML RPC. Most major software vendors are involved to some extent. Its future looks bright.
SOAP fits nicely into the Client/Server topology. Given a client that needs some functionality available on a server, SOAP can be used to specify an operation and its arguments to be submitted by the client to the server. At it's root, the data representing the operation is fairly basic. If the connection between the client and server were a TCP wire, a data trace would show about a page of XML. The XML is not complex and is often decipherable at a glance. The XML data is specified as a SOAP Envelope. An evolving SOAP specification defines the Envelope and its progeny. The XML data transmitted between the client and server is not arbitrary and should conform to a referenced WSDL instance published by the server. It's the WSDL that defines the published services and the invocation formats required for execution. The vast majority of SOAP documentation demonstrates SOAP over HTTP. Another mentioned transport is SMTP. In each case, the SOAP Envelope follows the respective header as an XML Payload.
Many web servers have been retrofitted to support a SOAP subsystem; e.g., Websphere, Apache, iPlanet, IIS, etc. There are a handful of SOAP toolkits. To name a few, MSSOAP Toolkit from Microsoft, AXIS from Apache, and DataSnap from Borland. A stand alone Tcl implementation, TclSOAP, is available at Source Forge. In the Implementation section, I'll get into the details of my retrofit for OpenACS; the soap-gateway package. Client SOAP examples using MSSOAP and AXIS can be found in the Samples section.
Here's a short list of steps required to enable SOAP/HTTP connectivity to your server. The instructions are brief and assumes the reader has administrative experience with OpenACS. More details will be available in a subsequent release.
Note: Verify 'public' access to your installed 'soap-gateway' using http and not https. Select the home of your 'soap-gateway' subsite to retrieve a listing of available services. Also verify the WSDL for each service can be returned without the need to authenticate into your server. This will allow clients to enumerate the published services and retrieve the functional specification for each. Eliminating the need to authenticate with the server for the purpose of retrieving service WSDLs removes binding complications for client side SOAP tools.
When importing a tcl library into the soap-gateway (i.e., any public methods under the ::sg::<my-service> namespace), the soap-gateway automatically grants public 'invoke' rights to any method named 'login'. This gives the client an opportunity to authenticate into the server before making any other calls.
Service libraries shipped with the soap-gateway are located in packages/soap-gateway/lib.
Sample SOAP client applications can be found here.
The SOAP Gateway package is subject to the Lesser General Public License.