advertisement

XML-RPC and SOAP (April 2003)

100 %
0 %
advertisement
Information about XML-RPC and SOAP (April 2003)
Technology

Published on March 5, 2014

Author: jace

Source: slideshare.net

Description

An introduction to two RPC systems that use open internet standards (made in April 2003).
advertisement

XML-RPC and SOAP An introduction to two RPC system that use open Internet standards.

What is RPC? RPC stands for Remote Procedure Call. RPC is a mechanism for making a procedure call across applications or machines. An RPC call involves calling a function with certain parameters and expecting a result. Both sides must agree on the format in which data is passed to and fro.

What is XML-RPC? XML-RPC implements RPC using open Web standards. Data is encoded (“marshalled”) in XML using a special DTD for XML-RPC. The RPC call is made using HTTP. The application exporting the function must implement or be attached to a HTTP server.

History of XML-RPC XML-RPC was created by Userland Software. First implementation: Frontier in April 1998. Supported universally now. Userland also created SOAP and RSS.

The Mechanics Caller asks library to call a function on a server with a parameter set. Library encodes parameters in XML and makes the call. Server processes request and returns results. Library decodes results from XML and returns results to caller.

Example Python Client [jace@Jace jace]$ python Python 2.2.2 (#1, 01/12/03, 07:51:34) [GCC Apple cpp-precomp 6.14] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from xmlrpclib import Server >>>

Example Python Client [jace@Jace jace]$ python Python 2.2.2 (#1, 01/12/03, 07:51:34) [GCC Apple cpp-precomp 6.14] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from xmlrpclib import Server >>> betty = Server("http://betty.userland.com") >>>

Example Python Client [jace@Jace jace]$ python Python 2.2.2 (#1, 01/12/03, 07:51:34) [GCC Apple cpp-precomp 6.14] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from xmlrpclib import Server >>> betty = Server("http://betty.userland.com") >>> print betty.examples.getStateName(41)

Example Python Client [jace@Jace jace]$ python Python 2.2.2 (#1, 01/12/03, 07:51:34) [GCC Apple cpp-precomp 6.14] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from xmlrpclib import Server >>> betty = Server("http://betty.userland.com") >>> print betty.examples.getStateName(41) South Dakota >>>

Example Request POST /RPC2 HTTP/1.0 Host: betty.userland.com Content-Type: text/xml ... <?xml version="1.0"?> <methodCall> <methodName>examples.getStateName</methodName> <params> <param> <value><i4>41</i4></value> </param> </params> </methodCall>

Example Response HTTP/1.1 200 OK Content-Type: text/xml ... <?xml version="1.0"?> <methodResponse> <params> <param> <value><string>South Dakota</string></value> </param> </params> </methodResponse>

Basic Parameter Types Integer (4-byte, signed) <i4> or <int> Boolean <boolean> String <string> Double Precision Floating Point <double> Date/Time <dateTime.iso8601> Binary <base64>

More Parameter Types Array <array> Collection of items of any data type. Multiple types are allowed in one array. Structure <struct> A structure is a named array, also called a dictionary or a hash table.

Example Array Original: [12, 'Egypt', FALSE, -31] <array> <data> <value><i4>12</i4></value> <value><string>Egypt</string></value> <value><boolean>0</boolean></value> <value><i4>-31</i4></value> </data> </array>

Example Structure Original: {'lowerBound': 18, 'upperBound': 139} <struct> <member> <name>lowerBound</name> <value><i4>18</i4></value> </member> <member> <name>upperBound</name> <value><i4>139</i4></value> </member> </struct>

Fault Responses A function call may fail for some reason. A failed response also uses HTTP code 200. Instead of a <params> tag containing results, a <fault> tag containing a fault code and fault string is returned. Both code and string are server defined.

Limitations No introspection available. No access to properties or variables. Only function calls. Can’t pass an object as a parameter. No named parameters either. HTTP and XML both have processing overheads. Text consumes more bandwidth.

Advantages Really simple. You can write a client in minutes, a server in a little longer. Lightweight. XML-RPC builds on existing HTTP and XML server and client libraries. Secure. HTTP already offers basic authentication, SSL/TLS and cookie auth.

Who Uses XML-RPC? Prominent Examples: UserLand Software (Manila, Radio) LiveJournal (now has an XML-RPC API) Zope (transparent support for XML-RPC) The KDE Project (kxmlrpc) Microsoft (Windows NT API; unverified)

SOAP Stands for Simple Object Access Protocol. Attempts to overcome XML-RPC’s limits. Is a W3C candidate recommendation. Created by DevelopMentor, IBM, Lotus, Microsoft and UserLand Software.

SOAP Over XML-RPC SOAP provides for user-defined data types, unlike XML-RPC’s limit of eight types. SOAP with WSDL (Web Services Description Language) supports object introspection. SOAP allows named parameters. SOAP allows extensive customisation.

SOAP Over Others Is firewall friendly. DCOM and CORBA dynamically assign ports. SOAP doesn’t. SOAP is vendor and platform independent. Is not bound to a protocol. Can be implemented over HTTP or FTP or SMTP. HTTP is scalable and easy to administer.

Limitations of SOAP Is neither simple nor lightweight nor easyto-use. Specification not guaranteed stable yet. Documentation contains errors. Too many cooks working on the specification, not co-operating with each other very well.

Not Covered Here Defining an XML-RPC server. Detailed examples of XML-RPC requests and responses. Details on SOAP.

Links XML-RPC Specification: http://www.xmlrpc.com/spec SOAP Specification: http://www.w3.org/TR/SOAP/ XML-RPC vs SOAP: http://weblog.masukomi.org/ writings/xml-rpc_vs_soap.htm

Q&A

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

Volker Weinhandl1 Web Services Einleitung Web Services XML ...

Präsentation zum Thema: "Volker Weinhandl1 Web Services Einleitung Web Services XML-RPC SOAP REST Seminar Internet Technologien."— ... April 2003. Autor ...
Read more

Suchergebnis auf Amazon.de für: Webservice: Bücher

KAPITEL 1 Einführung in Webservices Um Webservices und SOAP so gut ... November 2003. ... April 2016. von Tim Philipp Schäfers. ...
Read more

RFC 3529 - Using Extensible Markup Language-Remote ...

RFC 3529 Using XML-RPC in BEEP April 2003 I: ... "Using the Simple Object Access Protocol (SOAP) in Blocks Extensible Exchange Protocol ...
Read more

Web Services Essentials (O'Reilly XML): Ethan Cerami ...

XML Remote Procedure Calls (XML-RPC) SOAP - The foundation for most commercial Web Services development; Universal Discovery, ... Published on April 21, 2003
Read more

Franck Borel - UB-Freiburg SOAP-Kurs Einführung und ...

... Microsoft leitete von XML-RPC SOAP ab Am 18. April 2000 ... http://www.w3.org/2003/05/soap- encoding http://www.w3.org/2003/05/soap- encoding ...
Read more

Architektur Verteilter Systeme Teil 14: XML-RPC und SOAP

Teil 14: XML-RPC und SOAP. AVS ... Technologien. Hanser 2003 [14-4] Eberhart, Andreas; Fischer, ... erste Version April 1998
Read more

PowerPoint-Präsentation

... Microsoft leitete von XML-RPC SOAP ab Am 18. April 2000 reichte Microsoft mit Unterstützung ... env="http://www.w3.org/2003/05/soap-envelope ...
Read more

heise Netze - Using Extensible Markup Language-Remote ...

... RFC 3529 Using XML-RPC in BEEP April 2003 For example, here the boot ... E. and M. Rose, "Using the Simple Object Access Protocol (SOAP) ...
Read more

Cover Pages: XML Articles and Papers April 2003

XML Articles and Papers April 2003: ... April 2003. 15 pages. "XML-RPC is an Extensible Markup Language ... for example using XML-RPC, SOAP offers the ...
Read more