[[de:XML-RPC]]
'''XML-RPC''' is a [[remote procedure call]] protocol encoded in [[XML]]. It is a very simple protocol, defining only a handful of data types and commands, and the entire description can be printed on two pages of paper. This is in stark contrast to most RPC systems, where the standards documents often run into the thousands of pages and require considerable [[software]] support in order to be used.
It was first created by [[Dave Winer]] of [[UserLand Software]] in [[1995]] with [[Microsoft]]. However Microsoft considered it too simple, and started adding functionality. After several rounds of this, the standard was no longer so simple, and became what is now [[SOAP]].
==Data Types==
{| border="1" cellpadding="2"
!Name
!Tag Example
!Description
|-
|array
|
<array>
<data>
<value><i4>1404</i4></value>
<value><string>Something Here</string></value>
<value><i4>1</i4></value>
</data>
</array>
|Array of values, storing no keys
|-
|base64
|<base64>eW91IGNhbid0IHJlYWQgdGhpcyE=</base64>
|[[Base 64]]-encoded binary data
|-
|boolean
|<boolean>1</boolean>
|[[Boolean datatype|Boolean]] logical value (0 or 1)
|-
|date/time
|<dateTime.iso8601>19980717T14:08:55</dateTime.iso8601>
|Date and time
|-
|double
|<double>-12.53</double>
|Double [[precision]] floating number
|-
|integer
|<i4>42</i4>
|Whole number, [[integer]]
|-
|string
|<string>Hello world!</string>
|String of characters. Must follow [[XML]] encoding.
|-
|struct
|
<struct>
<member>
<name>foo</name>
<value><i4>1</i4></value>
</member>
<member>
<name>bar</name>
<value><i4>2</i4></value>
</member>
</struct>
|Array of values, storing keys
|}
==Examples==
An example of a typical XML-RPC request would be:
<?xml version="1.0"?>
<methodCall>
<methodName>examples.getStateName</methodName>
<params>
<param>
<value><i4>41</i4></value>
</param>
</params>
</methodCall>
An example of a typical XML-RPC response would be:
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value><string>South Dakota</string></value>
</param>
</params>
</methodResponse>
A typical XML-RPC fault would be:
<?xml version="1.0"?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>4</int></value>
</member>
<member>
<name>faultString</name>
<value><string>Too many parameters.</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>
==See also==
[[web service]], [[Software componentry#Technologies for Software Components|component technologies]]
==External links==
* [http://www.xml-rpc.com/ XML-RPC Homepage]
* [http://groups.yahoo.com/group/xml-rpc/ Forum]
* [http://www.xml.com/pub/rg/XML_RPC_Tutorials Tutorials]
* [http://xml.coverpages.org/xml-rpc.html Technology Reports]
* [http://citeseer.org/cs?q=XML+and+RPC Citations from CiteSeer]
* Implementations for ...
** [http://xmlrpc-c.sourceforge.net/ C and C++]
** [http://xmlrpcpp.sourceforge.net/ C++]
** [http://xmlrpc.sourceforge.net/ Java]
** [http://phpxmlrpc.sourceforge.net/ PHP]
** [http://aspxmlrpc.sourceforge.net/ ASP]
** [http://tclsoap.sourceforge.net/XMLRPCDomain.html TCL]
** [http://delphixml-rpc.sourceforge.net/ Delphi]
** [http://www.ntecs.de/projects/xmlrpc4r/ Ruby]
** [http://www.python.org/doc/current/lib/module-xmlrpclib.html Python]
** [http://search.cpan.org/~rjray/RPC-XML-0.53/ Perl]
** [http://xmlrpcflash.sourceforge.net/ Flash]
** [http://xml-rpc.net/ .NET], [http://freshmeat.net/projects/xmlrpccs/ C# .NET]
** [http://www.divisiblebyzero.com/ Objective-C/Cocoa]
[[Category:XML standards]]
[[Category:Web services]]
|