What is SOAP?
- SOAP stands for Simple Object Access Protocol
- SOAP is a communication protocol
- SOAP is for communication between applications
- SOAP is a format for sending messages
- SOAP communicates via Internet
- SOAP is platform independent
- SOAP is language independent
- SOAP is based on XML
- SOAP is simple and extensible
- SOAP allows you to get around firewalls
- SOAP is a W3C recommendation
- Stateless
- One-way message exchange paradigm
- Applications can create more complex interaction patterns (e.g., request/response, request/multiple responses, etc.) by combining such one-way exchanges with features provided by an underlying protocol and/or application-specific information
- Silent on the semantics of any application-specific data it convey
SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages A SOAP request:
| POST /InStock HTTP/1.1 Host: www.abidshafiq.com Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?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:Body xmlns:m=”http://www.example.org/stock”> <m:GetDesignPrice> <m:StockName>PSD</m:StockName> </m:GetDesignPrice > </soap:Body> </soap:Envelope> |
The SOAP response:
| HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?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:Body xmlns:m=”http://www.example.org/stock”> <m:GetDesignPriceResponse> <m:Price>20.0</m:Price> </m:GetDesignPriceResponse> </soap:Body> </soap:Envelope> |
