Presentation is loading. Please wait.

Presentation is loading. Please wait.

Netprog: Soap & XML-RPC1 XML-RPC and SOAP. Netprog: Soap & XML-RPC2 XML Extensible Markup Language Markup Language. –HTML is also a markup language (but.

Similar presentations


Presentation on theme: "Netprog: Soap & XML-RPC1 XML-RPC and SOAP. Netprog: Soap & XML-RPC2 XML Extensible Markup Language Markup Language. –HTML is also a markup language (but."— Presentation transcript:

1 Netprog: Soap & XML-RPC1 XML-RPC and SOAP

2 Netprog: Soap & XML-RPC2 XML Extensible Markup Language Markup Language. –HTML is also a markup language (but it's not extensible!). XML allows you to make up your own tags. Document Type Definition –Schema

3 Netprog: Soap & XML-RPC3 Sample XML 660012345 Joe X. Smith Exploiting the Information World 12345 ITEC-2110 123 main street 555-2929

4 Netprog: Soap & XML-RPC4 So What ? XML generation is simple XML Parsing is also pretty simple –there are lots of parsers available! Browsers understand XML (somewhat). –CSS style sheets –XSL: Extensible Stylesheet Language XML can be used for document storage and transfer.

5 Netprog: Soap & XML-RPC5 XML messaging RPC: XML is used to encode procedure calls and responses. EDI: Electronic Document Interchange –transfer documents between applications across a network purchase orders, financial transactions, etc.

6 Netprog: Soap & XML-RPC6 XML-RPC Use XML to encode requests –procedure name –parameter values Response is also an XML document –return value(s) –errors (faults) Both are well defined document types –tag names are defined in the XML-RPC specification document.

7 Netprog: Soap & XML-RPC7 Uses HTTP POST Use existing protocol (and software!). Avoid firewall issues (everyone allows HTTP traffic). XML-RPC Request is the body of an HTTP POST. XML-RPC Response is the body (content) of the HTTP response.

8 Netprog: Soap & XML-RPC8 Example Request (swiped from xml-rpc.com) POST /RPC2 HTTP/1.0 Host: betty.userland.com User-Agent: Frontier/5.1.2 (WinNT) Content-Type: text/xml Content-length: 181 examples.getStateName 41

9 Netprog: Soap & XML-RPC9 Sample Response HTTP/1.1 200 OK Connection: close Content-Length: 158 Content-Type: text/xml Date: Fri, 17 Jul 1998 19:55:08 GMT Server: UserLand Frontier/5.1.2-WinNT South Dakota

10 Netprog: Soap & XML-RPC10 XML-RPC Data Types or

11 Netprog: Soap & XML-RPC11 XML-RPC struct Hostname monte.cs.rpi.edu IPAddress 128.213.7.32

12 Netprog: Soap & XML-RPC12 XML-RPC array 12 Egypt 0 -31

13 Netprog: Soap & XML-RPC13 XML-RPC Programming Need to be able to generate HTTP requests (client) and responses(server). Need to generate XML documents. Need to parse XML documents and extract specific items. Need to handle faults (errors).

14 Netprog: Soap & XML-RPC14 SOAP Simple Object Access Protocol Same general idea as XML-RPC, but more features: –enumerations –Polymorphism (type determined at run time) –user defined data types

15 Netprog: Soap & XML-RPC15 SOAP XML Documents are more complex –use namespaces –formal "envelope" Soap Header Soap Body

16 Netprog: Soap & XML-RPC16 SOAP Request Example POST /StockQuote HTTP/1.1 Host: www.stockquoteserver.comwww.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/http://schemas.xmlsoap.org/soap/envelope/ SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> DIS

17 Netprog: Soap & XML-RPC17 XML-RPC vs. SOAP XML-RPC is much simpler There are lots of web services based on XML-RPC. SOAP makes it easier to exchange more complex documents. SOAP runs over many protocols: –HTTP, SMTP, FTP, …

18 Netprog: Soap & XML-RPC18 SOAP is an integral part of.NET Programmer Transparency Multiple Languages

19 Netprog: Soap & XML-RPC19 Resources xml-rpc.com (userland) –specification, info, tutorials, code resources www.soapware.org –tutorials, code resources www.w3.org –SOAP specification


Download ppt "Netprog: Soap & XML-RPC1 XML-RPC and SOAP. Netprog: Soap & XML-RPC2 XML Extensible Markup Language Markup Language. –HTML is also a markup language (but."

Similar presentations


Ads by Google