next up previous
Next: Performance results Up: SOAP Previous: Related efforts

Remote procedure calls in SOAP

Remote procedure calls in SOAP are essentially client-server interactions over HTTP where the request and response comply with SOAP encoding rules. The Request-URI (Universal Resource Identifier) in HTTP is typically used at the server end to map to a class or an object, but this is not mandated by SOAP. Additionally, the HTTP header SOAPAction specifies the interface name (a URI) and the name of the method to be called on the server. The SOAP message is an XML document whose root element, the Envelope, specifies the overall structure of the message, its intended recipient, and other attributes of the message. SOAP specifies a remote procedure call convention, which includes the representation and format to be used for calls and responses. A method call is modeled as a compound data element consisting of a sequence of fields (accessors), one for each parameter. A return structure consists of the return value as well as the out and in/out parameters. SOAP encoding rules specify the serialization for primitive and application-defined datatypes.

Figures 1 and 2 show the request and response structure of a remote procedure call transported as an HTTP request carrying a SOAP payload.


  
Figure 1: Example of a SOAP request sent via HTTP.

POST /Temperature HTTP/1.1
Host: www.temperature-service.com
Content-Type: text/xml
Content-Length: 357
SOAPAction: "http://weather.org/query#GetTemperature"

< 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:GetTemperature xmlns:m="http://weather.org/query">
       < longitude>39W< /longitude>
       < latitude>62S< /latitude>
    < /m:GetTemperature>
  < /SOAP-ENV:Body>
< /SOAP-ENV:Envelope>


  
Figure 2: Example of a SOAP response received via HTTP.

HTTP/1.1 200 OK
Content-Type: text/xml
Content-Length: 343

< 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:GetTemperatureResponse xmlns:m="http://weather.org/query">
      < centigrade>28.4< /centigrade>
    < /m:GetTemperatureResponse>
  < /SOAP-ENV:Body>
< /SOAP-ENV:Envelope>

SOAP allows hierarchically structured queries and responses, and specifies serialization of primitive string, numeric and date datatypes, and aggregates like arrays and vectors. Sparse arrays, and protocols for sending parts of them are also supported. New types may be defined using the <complexType> construct inside a schema definition.

Overall, SOAP provides many advantages. Unfortunately, its universality comes with a performance penalty: XML messages are textual and so the sizes of its messages are significantly larger than protocols which send binary data. Since a distinguishing characteristic of scientific computation is the need to handle large data sets, the performance of SOAP relative to specialized protocols that can use binary representations is an important issue. The next section tests SOAP performance relative to other communication protocols.


next up previous
Next: Performance results Up: SOAP Previous: Related efforts
SoapTeam: Extreme Computing Lab
2000-08-17