XML-RPC
Encyclopedia
XML-RPC is a remote procedure call
(RPC) protocol which uses XML
to encode its calls and HTTP as a transport mechanism. "XML-RPC" also refers generically to the use of XML for remote procedure call, independently of the specific protocol. This article is about the protocol named "XML-RPC".
of UserLand Software
and Microsoft
. As new functionality was introduced, the standard evolved into what is now SOAP.
The generic use of XML for remote procedure call
(RPC) was patented by Phillip Merrick
, Stewart Allen, and Joseph Lapp in April 2006, claiming benefit to a provisional application filed in March 1998. The patent is assigned to webMethods
, located in Fairfax, VA.
Identification of clients for authorization purposes can be achieved using popular HTTP security methods. Basic access authentication is used for identification, HTTPS
is used when identification (via certificates) and encrypted messages are needed. Both methods can be combined.
In comparison to REST
, where resources are transported, XML-RPC is designed to call methods.
XML-RPC is simpler to use and understand than SOAP because it
JSON-RPC
is similar to XML-RPC.
An example of a typical XML-RPC response would be:
A typical XML-RPC fault would be:
) and that XML-RPC doesn't add any value over XML. Both XML-RPC and XML require an application-level data model, such as which field names are defined in the XML schema or the parameter names in XML-RPC. Furthermore, XML-RPC uses about 4 times the number of bytes compared to plain XML to encode the same objects, which is itself bloated compared to JSON.
Remote procedure call
In computer science, a remote procedure call is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space without the programmer explicitly coding the details for this remote interaction...
(RPC) protocol which uses XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....
to encode its calls and HTTP as a transport mechanism. "XML-RPC" also refers generically to the use of XML for remote procedure call, independently of the specific protocol. This article is about the protocol named "XML-RPC".
History
XML-RPC, the protocol, was created in 1998 by Dave WinerDave Winer
Dave Winer is an American software developer, entrepreneur and writer in New York City. Winer is noted for his contributions to outliners, scripting, content management, and web services, as well as blogging and podcasting...
of UserLand Software
UserLand Software
UserLand Software is a US software company founded by Dave Winer in 1988. UserLand sells Web content management and blogging software packages and services.-Company History:Dave Winer founded the company in 1988 after leaving Symantec in the spring of 1988...
and Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...
. As new functionality was introduced, the standard evolved into what is now SOAP.
The generic use of XML for remote procedure call
Remote procedure call
In computer science, a remote procedure call is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space without the programmer explicitly coding the details for this remote interaction...
(RPC) was patented by Phillip Merrick
Phillip Merrick
Phillip Merrick was one of the original founders of webMethods, a high-flying company that went public during the Internet boom. Merrick attended Melbourne University in the early 1980s-References:...
, Stewart Allen, and Joseph Lapp in April 2006, claiming benefit to a provisional application filed in March 1998. The patent is assigned to webMethods
WebMethods
webMethods is an enterprise software company, acquired by Software AG, focused on application integration, business process integration and B2B partner integration. Founded in 1996, the company pioneered the use of web services to connect software applications together within a single organization...
, located in Fairfax, VA.
Usage
XML-RPC works by sending a HTTP request to a server implementing the protocol. The client in that case is typically software wanting to call a single method of a remote system. Multiple input parameters can be passed to the remote method, one return value is returned. The parameter types allow nesting of parameters into maps and lists, thus larger structures can be transported. Therefore XML-RPC can be used to transport objects or structures both as input and as output parameters.Identification of clients for authorization purposes can be achieved using popular HTTP security methods. Basic access authentication is used for identification, HTTPS
Https
Hypertext Transfer Protocol Secure is a combination of the Hypertext Transfer Protocol with SSL/TLS protocol to provide encrypted communication and secure identification of a network web server...
is used when identification (via certificates) and encrypted messages are needed. Both methods can be combined.
In comparison to REST
Rest
Rest may refer to:* Leisure* Human relaxation* SleepRest may also refer to:* Rest , a pause in a piece of music* Rest , the relation between two observers* Rest , a 2008 album by Gregor Samsa...
, where resources are transported, XML-RPC is designed to call methods.
XML-RPC is simpler to use and understand than SOAP because it
- allows only one method of method serialization, whereas SOAP defines multiple different encodings
- has a simpler security model
- does not require (nor support) the creation of WSDLWeb Services Description LanguageThe Web Services Description Language is an XML-based language that is used for describing the functionality offered by a Web service. A WSDL description of a web service provides a machine-readable description of how the service can be called, what parameters it expects and what data structures...
service descriptions, although XRDL provides a simple subset of the functionality provided by WSDL
JSON-RPC
JSON-RPC
JSON-RPC is a remote procedure call protocol encoded in JSON. It is a very simple protocol , defining only a handful of data types and commands...
is similar to XML-RPC.
Data types
Common datatypes are converted into their XML equivalents with example values shown below:Name | Tag Example | Description |
---|---|---|
array | Array of values, storing no keys | |
base64 | Base64 Base64 Base64 is a group of similar encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation... -encoded binary data |
|
boolean | Boolean Boolean datatype In computer science, the Boolean or logical data type is a data type, having two values , intended to represent the truth values of logic and Boolean algebra... logical value (0 or 1) |
|
date/time | Date and time in ISO 8601 ISO 8601 ISO 8601 Data elements and interchange formats – Information interchange – Representation of dates and times is an international standard covering the exchange of date and time-related data. It was issued by the International Organization for Standardization and was first published in 1988... format |
|
double | Double precision Double precision In computing, double precision is a computer number format that occupies two adjacent storage locations in computer memory. A double-precision number, sometimes simply called a double, may be defined to be an integer, fixed point, or floating point .Modern computers with 32-bit storage locations... floating point number |
|
integer | or |
Whole number, integer Integer The integers are formed by the natural numbers together with the negatives of the non-zero natural numbers .They are known as Positive and Negative Integers respectively... |
string | String of characters. Must follow XML encoding. | |
struct | Associative array Associative array In computer science, an associative array is an abstract data type composed of a collection of pairs, such that each possible key appears at most once in the collection.... |
|
nil | Discriminated null value; an XML-RPC extension |
Examples
An example of a typical XML-RPC request would be:An example of a typical XML-RPC response would be:
A typical XML-RPC fault would be:
Criticism
Critics of XML-RPC argue that RPC calls can be made with plain XML, (effectively this means RESTRest
Rest may refer to:* Leisure* Human relaxation* SleepRest may also refer to:* Rest , a pause in a piece of music* Rest , the relation between two observers* Rest , a 2008 album by Gregor Samsa...
) and that XML-RPC doesn't add any value over XML. Both XML-RPC and XML require an application-level data model, such as which field names are defined in the XML schema or the parameter names in XML-RPC. Furthermore, XML-RPC uses about 4 times the number of bytes compared to plain XML to encode the same objects, which is itself bloated compared to JSON.
Python
- xmlrpclib
- Renamed xmlrpc.client in Python 3.
- Creating XML-RPC Servers and Clients with Twisted
C++
- Libiqxmlrpc
- Ultra lightweight XML-RPC library for C++
- XML-RPC for C and C++
- XmlRpc++
- XmlRpc C++ client for Windows
- gSOAP toolkit for C and C++ supporting XML-RPC and more
- libmaia: XML-RPC for Qt/C++
Objective-C / GNUstep / Cocoa
- XMLRPC Framework
- Cocoa XML-RPC Framework: Open Source XML-RPC framework written for use in Mac OS X Cocoa applications.
Erlang
- XML-RPC for Erlang: This is an HTTP 1.1 compliant XML-RPC library for Erlang. It is designed to make it easy to write XML-RPC Erlang clients and/or servers. The library is compliant with the XML-RPC specification published by http://www.xmlrpc.org/
Java
- Apache XML-RPC: Open source library for Java
- XML-RPC Delight: Convenient serialisation/deserialisation for Apache XML-RPC using Java Annotations and Beans
- http://members.fortunecity.com/neptune42/xmlrpc/index.htm: Secure Apache XML-RPC
- Redstone XML-RPC Library: Redstone's Open Source Library - XML-RPC implementation in Java
- XML-RPC Library for Java ME: Open source client-side library for Java ME
- aXMLRPC: Open source XML-RPC client library for Java and Android
JavaScript
- XML-RPC for Node.js: Open source JavaScript XML-RPC client and server for node.js
XMPP
- pyJabberXMLRPC: Python classes for XMPP
- Jabber-RPC: Over the Extensible Messaging and Presence ProtocolExtensible Messaging and Presence ProtocolExtensible Messaging and Presence Protocol is an open-standard communications protocol for message-oriented middleware based on XML . The protocol was originally named Jabber, and was developed by the Jabber open-source community in 1999 for near-real-time, extensible instant messaging , presence...
protocol
Perl
- RPC::XML: A set of Perl classes for core data, message and XML handling
- Frontier-RPC: Another set of Perl modules for XML-RPC client/server implementation
- XML::RPC: Perl module implementation
PHP
- The Incutio XML-RPC Library for PHP: PHP classes for both client and server implementations
- PHP-XML-RPC: For PHP
- crVCL PHP Framework: Fast PHP Framework with native XML-RPC library
- xi library with PHP and Javascript XML-RPC: For PHP and Javascript
- Zend_XmlRpc: Part of the Zend FrameworkZend FrameworkZend Framework is an open source, object-oriented web application framework implemented in PHP 5 and licensed under the New BSD License.-Licensing:...
Other
- JSON/XML-RPC Client and Server: Abstract away the differences between JSON-RPC and XML-RPC
- RemObjects SDK Delphi and .NET package for XML-RPC, in addition to SOAP and others
- RealThinClient SDK: For Delphi/C++
- XML-RPC for ActionScript: For Flash ActionScript 2.0
- as3-rpclib: For Flex/Actionscript 3
- XML-RPC.NET: Open source library for .NET clients and servers
- XmlRpc-Light: Client and server library for OCaml
- S-XML-RPC: Client and server library for Common Lisp
- clj-xmlrpc: XML-RPC client for Clojure
- necessary-evil: XML-RPC Client and Ring-based Server for Clojure
- HaXR: Client and server library for Haskell
- Ruby XML-RPC library: For Ruby
- XML-RPC interface to Lua: For Lua
- android-xmlrpc: A light XML-RPC client for Google Android
- XML-RPC for Tcl: A Tcl implementation of XML-RPC providing client and server support
- http://earl.strain.at/space/rebXR+Users+Guide: RebXR, a full client/server XML-RPC implementation for REBOL.
See also
- Ajax (programming)Ajax (programming)Ajax is a group of interrelated web development methods used on the client-side to create asynchronous web applications...
- Component technologies
- List of web service markup languages
- OPMLOPMLOPML is an XML format for outlines...
- Web serviceWeb serviceA Web service is a method of communication between two electronic devices over the web.The W3C defines a "Web service" as "a software system designed to support interoperable machine-to-machine interaction over a network". It has an interface described in a machine-processable format...