The basic structure of XML-RPC consists of a client, a server, and an XML document. The client sends an HTTP request to the server, containing an XML document that specifies the name and the parameters of the function to be executed. The server processes the request and returns an HTTP response, containing an XML document tunnel rush that contains the result or an error message. The XML document follows a predefined tunnel rush format that defines the data types and the structure of the request and the response.
XML-RPC is a protocol that uses XML messages to perform Remote Procedure Calls. Requests are encoded in XML and sent via HTTP POST; XML responses are embedded in the body of the HTTP response.
More succinctly, XML-RPC = HTTP + XML + Remote Procedure Calls.
Because XML-RPC is platform independent, diverse applications can communicate with one another. For example, a Java client can speak XML-RPC to a Perl server.
To get a quick sense of XML-RPC, here is a sample XML-RPC request to a weather service (with the HTTP Headers omitted):
weather.getWeather 10016
The request consists of a simple element, which specifies the method name (getWeather) and any method parameters (zip code).
getWeather
zip code
Here is a sample XML-RPC response from the weather service:
65
The response consists of a single element, which specifies the return value (the current temperature). In this case, the return value is specified as an integer.
In many ways, XML-RPC is much simpler than SOAP, and therefore represents the easiest way to get started with Web services.
The official XML-RPC specification is available at XML-RPC.com. Dozens of XML-RPC implementations are available in Perl, Python, Java, and Ruby. See the XML-RPC home page for a complete list of implementations.Thanks!Manoj [InfoAxon Technologies Ltd.]