- 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, and is derived from XML-RPC, another of those protocols. 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, like 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 its widespread acceptance by major corporations and Open Source development efforts. Additionally, a wide variety of freely available tools significantly ease the transition to SOAP-based implementations. However, the somewhat lengthy XML syntax can also be a drawback. For example, GIOP and DCOM use much shorter, binary message formats. On the other hand, hardware appliances are available to accelerate processing of XML messages. And "XML Binary" is also being explored as a means for streamlining the throughput requirements of raw (text) XML.
See also - Component technologies
- Web service and some of its core technologies WSDL, UDDI
- WS-I Basic Profile
External links |