Understanding SOAP: A Lightweight Protocol for Information Exchange in Distributed Environments
This article delves into the Simple Object Access Protocol (SOAP) version 1.1, a lightweight XML-based protocol designed for information exchange in decentralized, distributed environments. It consists of three main parts: an envelope defining the message framework, a set of encoding rules for application-defined datatypes, and conventions for remote procedure calls. Although SOAP can work with other protocols, it is primarily designed for use with HTTP. The article also covers a sample SOAP message and its structure in both request and response formats.
Understanding SOAP: A Lightweight Protocol for Information Exchange in Distributed Environments
E N D
Presentation Transcript
Simple Object Access Protocol(SOAP) v1.1 CS-328 Dick Steflik
SOAP • Lightweight protocol for exchanging information in a decentralized, distributed environment • XML based consisting of three parts • an envelope that defines the framework for describing what is in a message and how to process it • a set of encoding rules for instances of application defined datatypes • a convention for representing remote procedure calls and responses • can be used in conjunction with othere protocols but is currently only defined for use in combination with HTTP • Current Status - still underdevelopment ; W3C Note
SOAP Message Embedded 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 Embedded 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>