Presentation is loading. Please wait.

Presentation is loading. Please wait.

SOAP Same basic functionality as XMLRPC but extensible –complex data structures –intermediate processing possible –more support for classic RPC constructs.

Similar presentations


Presentation on theme: "SOAP Same basic functionality as XMLRPC but extensible –complex data structures –intermediate processing possible –more support for classic RPC constructs."— Presentation transcript:

1 SOAP Same basic functionality as XMLRPC but extensible –complex data structures –intermediate processing possible –more support for classic RPC constructs http (not necessarily) provides connection management, framing, session

2 SOAP REQUEST (Examples from IBM Developerworks SOAP tutorial. See course resources page) http request must be POST http headers contain most of the control POST /calendar-request HTTP/1.1 Host: uche.ogbuji.net Content-Type: text/xml; charset="utf-8" Content- Length: 507 SOAPAction: "http://uche.ogbuji.net/soap-example" SOAPAction is a URN advising server, especially for routing, SOAP-aware firewalls, and other facilities. In Wrox example it is ""

3 HTTP Request Body SOAP Envelope containing SOAP body encodingStyle is the serialization schema; it describes data types and other things telling how to interpret the body.

4 SOAP serialization encodingStyle often defaults as above but sometimes is rdf, XMLRPC, custom XML, or other things that validating parsers can deal with. "SOAP is like a set of Russian dolls in its layers of encapsulation. There are the HTTP headers, then the SOAP envelope, and then the SOAP body. Each layer provides metadata for the immediately enclosed layer. Metadata is information that helps an application make sense of the important data being transported. For instance, the HTTP header specifies the character encoding as metadata for the HTTP body. This makes sure that the application properly translates the stream of bits into a series of characters. The outermost portion of the HTTP body is the SOAP envelope. This contains the SOAP-ENV:encodingStyle attribute which specifies the structure of the actual request. This metadata tells the application how to make sense of the XML elements and attributes within the body, which make up the actual request." IBM Developerworks SOAP Tutorial

5 SOAP Body IDL for a Calendar application module Calendar { struct Date { unsigned short day; unsigned short month; unsigned short year; }; exception InvalidDate {string field; }; interface CalendarWidget { void addListing(in Date when, in string what) raises (InvalidDate); string getListings(in Date monthOf) raises (InvalidDate); }; };

6 SOAP Body Call the addListing service

7 SOAP request POST /calendar-request HTTP/1.1 Host: uche.ogbuji.net Content-Type: text/plain; charset="utf-8" Content-Length: 507 21 6 2001 A total eclipse visible across Central Africa.

8 SOAP Response HTTP/1.1 200 OK Server: PythonSimpleHTTP/2.0 Date: Tue, 28 Nov 2000 04:23:03 GMT Content-type: text/xml; charset="utf-8" Content-length: 296 empty response See IDL


Download ppt "SOAP Same basic functionality as XMLRPC but extensible –complex data structures –intermediate processing possible –more support for classic RPC constructs."

Similar presentations


Ads by Google