AquaLogic User Interaction Development Guide

     Previous Next  Open TOC in new window   View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

About SOAP

SOAP is a text-based protocol to wrap XML data for any type of transport, providing an efficient way to communicate structured data.

The SOAP 1.1 specification describes SOAP as follows: “SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: an envelope that defines a framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing remote procedure calls and responses.”

SOAP is based on Web standards. Like HTML, SOAP uses tags to indicate the role of each piece of information. In most implementations, SOAP uses HTTP for its transport protocol. A SOAP request is an XML document that describes a method to invoke on a remote machine and any parameters to be used. A program sends a SOAP request to a SOAP server. The SOAP server tries to execute the method with the parameters it was passed, and it sends back a SOAP response (the result or an error message). A SOAP endpoint is an HTTP-based URL identifying a target for method invocation.

A common analogy illustrates this concept well. If your XML code was a letter, SOAP would be the envelope; like an envelope, SOAP protects content from unauthorized access and provides information about the sender and the addressee. All the elements of the SOAP envelope are defined by a schema. The schema URI is also the identifier for the SOAP envelope namespace: http://schema.xmlsoap.org/soap/envelope.

As in standard XML, SOAP uses namespaces to segregate content. The formal designation of a namespace is a URI, usually a URL. Namespaces ensure unique element references, and they allow a processor to pick out which instructions it should obey and treat instructions for other processors as simple data. Processors are set up to handle elements from a particular namespace. Elements that have no namespace are treated as data.

SOAP Message in HTTP Request:
POST /StockQuote HTTP/1.1
Host: www.stockquoteserver.com
Content-Type: text/xml; charset='utf-8'
Content-Length: nnnn
SOAPAction: 'Some-URI'

<SOAP-ENV:Envelope 
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' 
SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'> 
<SOAP-ENV:Body> 
<m:GetLastTradePrice xmlns:m='Some-URI'> 
<symbol>DIS</symbol> 
</m:GetLastTradePrice> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope>
SOAP Message in HTTP Response:
HTTP/1.1 200 OK 
Content-Type: text/xml; charset='utf-8' 
Content-Length: nnnn

<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' 
SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
<SOAP-ENV:Body> 
<m:GetLastTradePriceResponse xmlns:m='Some-URI'> 
<Price>34.5</Price> 
</m:GetLastTradePriceResponse> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope>

Download the complete SOAP 1.1 specification from the World Wide Web Consortium at http://www.w3c.org/TR/SOAP/.

ALI's SOAP API exposes commonly used elements of the traditional portal API, focused on the functions required to develop applications that access portal users, Communities, Portlets, and Knowledge Directory functions. The IDK's PRC API provides an efficient, object-oriented way to call into the portal's SOAP API. For details, see About Programmable Remote Client (PRC) Remote APIs.


  Back to Top      Previous Next