XML-RPC is a
remote procedure call
In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure (subroutine) to execute in a different address space (commonly on another computer on a shared network), which is coded as if it were a normal (l ...
(RPC)
protocol
Protocol may refer to:
Sociology and politics
* Protocol (politics), a formal agreement between nation states
* Protocol (diplomacy), the etiquette of diplomacy and affairs of state
* Etiquette, a code of personal behavior
Science and technolog ...
which uses
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
to encode its calls and
HTTP
The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, ...
as a transport mechanism.
[Simon St. Laurent, Joe Johnston, Edd Dumbill. (June 2001) ''Programming Web Services with XML-RPC.'' O'Reilly. First Edition.]
History
The XML-RPC protocol was created in 1998 by
Dave Winer
Dave Winer (born May 2, 1955, in Queens, New York City) is an American software developer, entrepreneur, and writer who resides in New York City. Winer is noted for his contributions to outliners, scripting, content management, and web servi ...
of
UserLand Software
UserLand Software is a US-based software company, founded in 1988, that sells web content management, as well as blogging software packages and services.
Company history
Dave Winer founded the company in 1988 after leaving Symantec in the spri ...
and
Microsoft
Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
, with Microsoft seeing the protocol as an essential part of scaling up its efforts in business-to-business e-commerce. As new functionality was introduced, the standard evolved into what is now
SOAP
Soap is a salt of a fatty acid used in a variety of cleansing and lubricating products. In a domestic setting, soaps are surfactants usually used for washing, bathing, and other types of housekeeping. In industrial settings, soaps are use ...
.
UserLand supported XML-RPC from version 5.1 of its Frontier web content management system,
released in June 1998.
XML-RPC's idea of a human-readable-and-writable, script-parsable standard for HTTP-based requests and responses has also been implemented in competing specifications such as Allaire's
Web Distributed Data Exchange (WDDX) and webMethod's
Web Interface Definition Language (WIDL). Prior art wrapping
COM
Com or COM may refer to:
Computing
* COM (hardware interface), a serial port interface on IBM PC-compatible computers
* COM file, or .com file, short for "command", a file extension for an executable file in MS-DOS
* .com, an Internet top-level d ...
,
CORBA
The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) designed to facilitate the communication of systems that are deployed on diverse platforms. CORBA enables collaboration between sys ...
, and
Java RMI
In computing, the Java Remote Method Invocation (Java RMI) is a Java API that performs remote method invocation, the object-oriented equivalent of remote procedure calls (RPC), with support for direct transfer of serialized Java classes and dist ...
objects in XML syntax and transporting them via HTTP also existed in DataChannel's WebBroker technology.
The generic use of XML for
remote procedure call
In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure (subroutine) to execute in a different address space (commonly on another computer on a shared network), which is coded as if it were a normal (l ...
(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 was assigned to
webMethods
webMethods was an enterprise software company focused on application integration, business process integration and B2B partner integration. Founded in 1996, the company sold systems for organizations to use web services to connect software app ...
, located in
Fairfax, VA
The City of Fairfax ( ), colloquially known as Fairfax City, Downtown Fairfax, Old Town Fairfax, Fairfax Courthouse, FFX, or simply Fairfax, is an independent city in the Commonwealth of Virginia in the United States. At the 2010 census the po ...
. The patent expired on 23 March 2019
Usage
In XML-RPC, a client performs an RPC by sending an HTTP request to a server that implements XML-RPC and receives the HTTP response. A call can have multiple parameters and one result. The protocol defines a few data types for the parameters and result. Some of these data types are complex, i.e. nested. For example, you can have a parameter that is an array of five integers.
The parameters/result structure and the set of data types are meant to mirror those used in common programming languages.
''Identification'' of clients for authorization purposes can be achieved using popular HTTP security methods.
Basic access authentication
In the context of an HTTP transaction, basic access authentication is a method for an HTTP user agent (e.g. a web browser) to provide a user name and password when making a request. In basic HTTP authentication, a request contains a header field i ...
can be used for identification and authentication.
In comparison to RESTful protocols, where ''resource representations'' (documents) are transferred, XML-RPC is designed to ''call methods''. The practical difference is just that XML-RPC is much more structured, which means common library code can be used to implement clients and servers and there is less design and documentation work for a specific application protocol. One salient technical difference between typical RESTful protocols and XML-RPC is that many RESTful protocols use the HTTP URI for parameter information, whereas with XML-RPC, the URI just identifies the server.
JSON-RPC
JSON-RPC is a remote procedure call protocol encoded in JSON. It is similar to the XML-RPC protocol, defining only a few data types and commands. JSON-RPC allows for notifications (data sent to the server that does not require a response) and for m ...
is similar to XML-RPC.
Data types
Common
datatypes are converted into their XML equivalents with example values shown below:
Examples
An example of a typical XML-RPC request would be:
examples.getStateName
40
An example of a typical XML-RPC response would be:
South Dakota
A typical XML-RPC fault would be:
faultCode
4
faultString
Too many parameters.
Criticism
Recent critics (from 2010 and onwards) of XML-RPC argue that RPC calls can be made with plain XML, and that XML-RPC does not 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 verbose compared to
JSON
JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other ser ...
.
[
]
See also
*
Weblogs.com Weblogs.com is a website created by UserLand Software and later maintained by Dave Winer. It launched in late 1999 as a free, registration-based web crawler monitoring weblogs, was converted into a ping-server in October 2001, and came to be used b ...
*
Pingback A pingback is one of four types of linkback methods for Web authors to request notification when somebody links to one of their documents. This enables authors to keep track of who is linking to, or referring to their articles. Some weblog softwar ...
*
Ajax (programming)
Ajax (also AJAX ; short for " Asynchronous JavaScript and XML") is a set of web development techniques that uses various web technologies on the client-side to create asynchronous web applications. With Ajax, web applications can send and retri ...
*
Component technologies
*
Comparison of data serialization formats
This is a comparison of data serialization formats, various ways to convert complex objects to sequences of bits. It does not include markup languages used exclusively as document file formats.
Overview
Syntax comparison of human-readable form ...
*
OPML
OPML (Outline Processor Markup Language) is an XML format for outlines (defined as "a tree, where each node contains a set of named attributes with string values"). Originally developed by UserLand as a native file format for the outliner appl ...
*
JSON-RPC
JSON-RPC is a remote procedure call protocol encoded in JSON. It is similar to the XML-RPC protocol, defining only a few data types and commands. JSON-RPC allows for notifications (data sent to the server that does not require a response) and for m ...
*
Web service
*
gRPC
gRPC (Google Remote Procedure Calls) is a cross-platform open source high performance Remote procedure call, Remote Procedure Call (RPC) framework. gRPC was initially created by Google, which has used a single general-purpose RPC infrastructure ...
References
External links
*
{{DEFAULTSORT:Xml-Rpc
XML-based standards
Web services
Internet protocols
Remote procedure call