Simple Object Access Protocol (SOAP) Overview

Simple Object Access Protocol (SOAP) is an XML-based protocol used for exchanging information in a decentralized and distributed environment using XML, is a standard developed by the W3C.
  • SOAP is Lightweight messaging framework based on XML
  • Supports simple messaging and RPC
  • SOAP consists of
    • Envelope construct: defines the overall structure of messages
    • Encoding rules: define the serialization of application data types
    • SOAP RPC: defines representation of remote procedure calls and responses
    • Binding framework: binding to protocols such as HTTP, SMTP
    • Fault handling
  • Soap supports advanced message processing:
    • forwarding intermediaries: route messages based on the semantics of message
    • active intermediaries: do additional processing before forwarding messages, may modify message
SOAP Building Blocks:
The basic structure of a SOAP message consists of a header and a body, both of which the contents are application specific, i.e. not defined by SOAP. The differentiation is made to distinguish information that is to be processed by all intermediaries (Header) and information that is to be processed at the final destination (Body).




Envelope (required) – identifies XML document as SOAP message
Header (optional) – contains header information
Body (required) –call and response information
Fault (optional) – errors that occurred while processing message. Fault Elements also contains sub elements.


Skeleton of SOAP Message :

<?xml version="1.0"?>

<soap:Envelope

xmlns:soap="http://www.w3.org/2001/12/soap-envelope"

soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">


<soap:Header>

  ...

  ...

</soap:Header>


<soap:Body>

  ...

  ...

  <soap:Fault>

    ...

    ...

  </soap:Fault>

</soap:Body>


</soap:Envelope>

Search:

Recent Posts