As mentioned earlier, XML-RPC was introduced by UserLand Software with two goals in mind: simplicity and openness. At the wire level, XML-RPC applications perform remote procedure calls using XML as the data-encoding format and HTTP as the transport mechanism. A sample procedure call might look like this:
<?xml version="1.0"?> <methodCall> <methodName>informIT.getUserAddress</methodName> <params> <param> <value> <int>198172</int> </value> </param> </params> </methodCall>
In the call above, the server-based "procedure" name is informIT.getUserAddress. This procedure call passes in one integer value set to 198172. XML-RPC defines the int datatype, along with string, boolean, double, dateTime.iso8601, base64, array, and struct. A server response is packaged as XML, as you would expect, and is just as straightforward. For example, the server reply to our informIT.getUserAddress might be as follows:
<?xml version="1.0"?> <methodResponse> <params> <param> <value> <string>123 N. Elm Street Fargo, North Dakota</string> </value> </param> </params> </methodResponse>
If you're interested in getting started, you may be surprised that you now have an adequate knowledge base to begin! XML-RPC implementations are available for a variety of programming languages, including Java, PHP, Perl, and Python. These packages hide the XML construction and parsing specifics from the developer, allowing simple method calls in the native language.