SOAP

This article is about a computer protocol. For the common cleaning mixture, see Soap. For other uses of the acronym SOAP, see Soap (disambiguation).

SOAP (formerly an acronym of Simple Object Access Protocol) is a light-weight protocol for exchanging messages between computer software, typically in the form of software componentry. The word object implies that the use should adhere to the object-oriented programming paradigm.

SOAP is an extensible and decentralized framework that can work over multiple computer network protocol stacks. Remote procedure calls can be modeled as an interaction of several SOAP messages. SOAP is one of the enabling protocols for Web services.

SOAP can be run on top of all the Internet Protocols, but HTTP is the most common and the only one standardized by the W3C. SOAP is based on XML, and its design follows the Head-Body software pattern, not unlike HTML. The optional Header contains meta-information such as information for routing, security, and transactions. The Body transports the main information, sometimes known as the payload. The payload is compliant with an XML Schema.

Example SOAP messages

By way of example, here is how a client might format a SOAP message requesting product information from a fictional warehouse web service:

 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
     <getProductDetails xmlns="http://warehouse.example.com/ws">
       <productId>827635</productId>
     </getProductDetails>
   </soap:Body>
 </soap:Envelope>

Here is how the warehouse web service might format its reply message with the requested product information:

 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
     <getProductDetailsResponse xmlns="http://warehouse.example.com/ws">
       <getProductDetailsResult>
         <productName>Toptimate 3-Piece Set</productName>
         <productId>827635</productId>
         <description>3-Piece luggage set.  Black Polyester.</description>
         <price>96.50</price>
         <inStock>true</inStock>
       </getProductDetailsResult>
     </getProductDetailsResponse>
   </soap:Body>
 </soap:Envelope>


HTTP was chosen as the primary transport protocol since it works well with today's internet infrastructure, in particular firewalls. This is a major advantage over other distributed protocols like GIOP/IIOP or DCOM which are normally filtered by firewalls.

XML was a good choice as message format because of the wide variety of freely available tools and know how. But where is light there is shadow. This somewhat lengthy XML syntax can also be a drawback - GIOP or DCOM use much shorter, binary message formats.

See also

External links

de:Simple Object Access Protocol eo:SOAP fr:Simple object access protocol nl:Simple Object Access Protocol ja:Simple Object Access Protocol zh:SOAP


This article is licensed under the GNU Free Documentation License. It uses material from Wikipedia article. Browse Wikipedia for more information.