SOAP Simple Object Access Protocol A clean tool
SOAP : Simple Object Access Protocol A ‘clean’ tool for remote procedure calls.
What is SOAP? o o o Protocol for information exchange between applications via Internet. 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 POST /weather HTTP/1. 1 Content-Type: text/xml; charset=utf-8 Content-length: XXX SOAPAction: "http: //bouy. atlanticocean. com/weather" <? xml version="1. 0"? > <SOAP-ENV: Envelope xmlns: SOAP-ENV="http: //schemas. xmlsoap. org/soap/envelope/" xmlns: xsi="http: //www. w 3. org/1999/XMLSchema-instance"> <SOAP-ENV: Body> <weather: get. Weather. Conditions xmlns: weather="http: //buoy. atlanticocean. com/"> <latitude xsi: type="xsd: int">30</latitude> <longitude xsi: type="xsd: int">50</longitude> </weather: get. Weather. Conditions> </SOAP-ENV: Body> </SOAP-ENV: Envelope>
What is all this junk? … <weather: get. Weather. Conditions xmlns: weather="http: //buoy. atlanticocean. com/"> <latitude xsi: type="xsd: int">30</latitude> <longitude xsi: type="xsd: int">50</latitude> </weather: get. Weather. Conditions> … o o The server has an object defined as ‘weather’ has a method called get. Weather. Conditions( int latitude, int longitude ) If we were processing data from the server and we wanted the weather conditions, we would request it by saying: weather. get. Weather. Conditions( 30, 50 );
What could the response be? <? xml version='1. 0' ? > <SOAP-ENV: Envelope xmlns: SOAP-ENV="http: //schemas. xmlsoap. org/soap/envelope/"> <SOAP-ENV: Body> <weather: conditions id="weather_id" xmlns: weather="http: //bouy. atlanticocean. com/weather"> <latitude>30 degrees</latitude> <longitude>50 degrees</longitude> <timestamp>04/12/2005 12: 34: 05</timestamp> <temperature>36 degrees</temperature> <description>It's looking like the perfect storm. </description> <!--. . . more conditions go here. . . --> </weather: conditions> </SOAP-ENV: Body> </SOAP-ENV: Envelope>
How can SOAP send attachments? … <weather: conditions id="weather_id" xmlns: weather="http: //bouy. atlanticocean. com/weather"> … <aerial. Snapshot href="cid: 30 deg 50 deg. jpg@atlanticocean. com"/> <satellite. Feed href="cid: 30 deg 50 deg. mov@atlanticocean. com"/> <publication href="cid: Atlantic. Ocean. pdf@atlanticocean. com"/> … </weather: conditions> … http: //www. whoi. edu/sbl/lite. Site. do? litesiteid=2332&article. Id=3898
WHOI CMS & Connect. WHOI o WHOI CMS is an application that provides web-site driven services. n n o Homepage Builder, Site Builder Lite WHOI Headlines, WHOI Housing Connect. WHOI is an application that provides contact information services. n n LDAP Email Administrator
WHOI CMS & Connect. WHOI cont’d o o Information sharing achieved by SOAP Homepage Builder n Updates to contact information makes a SOAP request to Connect. WHOI o WHY? 1. 2. 3. data requirements are met Necessary systems receive changes To comply with MVC framework of development – write once, use many
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 the ‘must. Understand’ attribute.
Are there SOAP alternatives? o XML-RPC n n n a precursor to SOAP designed by Dave Winer of User. Land Software (also participated in the development of SOAP) more lightweight and easier to implement less full-featured lacks support
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: 14