SOAP Simple Object Access Protocol What is SOAP
SOAP : Simple Object Access Protocol
What is SOAP? o o Protocol for information exchange between applications via Internet. W 3 C web services standard. Defines a way of passing XMLencoded data, including binary content. Defines a way of performing remote procedure calls (RPCs).
Where did SOAP come from? o o o Coauthored by representatives of IBM, Lotus, Microsoft, Develop. Mentor, and User. Land. Later submitted to the World Wide Web Consortium (W 3 C). Current SOAP development is the domain of the W 3 C XML Protocol Working Group
How does SOAP work? o Implements the request/response model of HTTP A client sends a SOAP message to a server that processes the request and responds with a SOAP message of its own.
What is a SOAP Message? o Two required components: 1. 2. o Envelope - packages the data Body - is the data. A third, optional component: 1. Header - contains descriptions about the message, data, and/or processing instructions.
Sample SOAP Message <? xml version="1. 0"? > <SOAP-ENV: Envelope … > <SOAP-ENV: Body> <camera: get. Feed sensor="http: //observatory. leo 15. edu? sensor=104"> <begin. Date>04 -28 -2005 11: 21: 00</begin. Date> <video. Length>30</video. Length> </ camera: get. Feed> </SOAP-ENV: Body> </SOAP-ENV: Envelope>
What does this mean? … <camera: get. Feed sensor="http: //oservatory. leo 15. edu? sensor=1045"> <begin. Date>04 -28 -2005 11: 21: 00</begin. Date> <video. Length>30</video. Length> </ camera: get. Feed> … o o o The observatory may have a sensor defined as ‘camera’ has a method called get. Feed() has two parameters: n begin. Date: the instance in time you want the returning video file to begin n video. Length: how much video do you want to see
What could the response be? <? xml version='1. 0' ? > <SOAP-ENV: Envelope …> <SOAP-ENV: Body> <camera: get. Feed id=“ 104"> <position>30 degrees</position> <direction>NNE</direction> <timestamp>04/29/2005 12: 34: 05</timestamp> <temperature>36 degrees</temperature> <!--. . . More metadata might go here. . . --> <video. Feed href="cid: 04282005113000. mov@leo 15. edu"/> </camera: get. Feed> </SOAP-ENV: Body> </SOAP-ENV: Envelope> --<MIME Attachment> Content-Type: video/quicktime Content-Transfer-Encoding: binary Content-ID: <cid: 04282005113000. mov@leo 15. edu>. . . Raw MOV image…
Why use SOAP? o o Platform & Language independent. It is a W 3 C standard, a standard amongst the web services community, and it’s “e. Xstensible” Allows for binary data attachments. Enforce processing requirements with xml schemas written for Math. ML, and other data definitions.
Resources Gentle Introduction to SOAP A Busy Developer's Guide to SOAP 1. 1 W 3 C Links: SOAP Specification(W 3 C) SOAP 1. 2 Attachment(W 3 C)
- Slides: 13