HOME

TheInfoList



OR:

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 computer network), which is written as if it were a ...
(RPC) protocol which uses
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
to encode its calls and
HTTP HTTP (Hypertext Transfer Protocol) 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, wher ...
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 service ...
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 spr ...
and
Microsoft Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
, 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 (chemistry), salt of a fatty acid (sometimes other carboxylic acids) used for cleaning and lubricating products as well as other applications. In a domestic setting, soaps, specifically "toilet soaps", are surfactants usually u ...
. 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,
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 sy ...
, and Java RMI 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 computer network), which is written as if it were a ...
(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, located in
Fairfax, Virginia Fairfax ( ) is an independent city (United States), independent city in Virginia and the county seat of Fairfax County, Virginia, in the United States. As of the 2020 United States census, 2020 census, the population was 24,146. Fairfax is pa ...
. The patent expired on March 23, 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 ...
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 (JavaScript Object Notation-Remote Procedure Call) is a JSON-based wire protocol for remote procedure calls (RPC). It is similar to the XML-RPC protocol, defining only a few data types and commands. JSON-RPC allows for notifications (data ...
is similar to XML-RPC.


Data types

Common
datatype In computer science and computer programming, a data type (or simply type) is a collection or grouping of data values, usually specified by a set of possible values, a set of allowed operations on these values, and/or a representation of these ...
s 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 or ) is an open standard file format and electronic data interchange, data interchange format that uses Human-readable medium and data, human-readable text to store and transmit data objects consi ...
.


See also

* Weblogs.com *
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 I/O, 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 c ...
* 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 format A document file format is a Text file, text or bi ...
* OPML *
JSON-RPC JSON-RPC (JavaScript Object Notation-Remote Procedure Call) is a JSON-based wire protocol for remote procedure calls (RPC). It is similar to the XML-RPC protocol, defining only a few data types and commands. JSON-RPC allows for notifications (data ...
*
Web service A web service (WS) is either: * a service offered by an electronic device to another electronic device, communicating with each other via the Internet, or * a server running on a computer device, listening for requests at a particular port over a n ...
*
gRPC gRPC (acronym for gRPC Remote Procedure Calls) is a cross-platform high-performance remote procedure call (RPC) framework. gRPC was initially created by Google, but is open source and is used in many organizations. Use cases range from microservi ...


References


External links

* {{DEFAULTSORT:Xml-Rpc XML-based standards Web services Internet protocols Remote procedure call