Java Tutorial - Java Script : Introduction to XML-RPC

Java Tutorial - Java Script :

Introduction to XML-RPC

Java supports one well-established technique for remote procedure calling: remote method invocation (RMI). RMI shares a trait in common with RPC efforts such as the Common Object Request Broker Architecture (CORBA) and the Open Network Computing RPC from Sun: complexity. All three are designed to be robust solutions to a large variety of remote computing tasks. This sophistication has been one of the hindrances to the adoption of existing RPC efforts. The complexity required to implement some of these solutions can be more than a programmer wants to take on simply to exchange information over a network. A simpler alternative, XML-RPC, has become widely adopted for web services. Client/server implementations of XML-RPC are available for most platforms and programming languages in widespread use. UserLand Software offers a directory of implementations at http://www.xmlrpc.com.
XML-RPC exchanges information using a combination of HTTP, the protocol of the World Wide Web, and XML, a format for organizing data independent of the software used to read and write it. The following data types are supported by XML-RPC:
·         array—A data structure that holds multiple elements of any of the other data types, including arrays
·         base64—Binary data in Base 64 format
·         boolean—True-false values that are either 1 (true) or 0 (false)
·         dateTime.iso8601—A string containing the date and time in ISO8601 format (such as 20070915T19:20:15 for 7:20 p.m. (and 15 seconds) on Sept. 15, 2007)
·         double—Eight-byte signed floating-point numbers
·         int (also called i4)—Signed integers ranging in value from –2,147,483,648 to 2,147,483,647, the same size as int values in Java
·         string—Text
·         struct—Name-value pairs of associated data where the name is a string and the value can be any of the other data types (comparable to the HashMap class in Java)
XML-RPC also supports the array data type, which is used to hold arrays of any other kind of data, including arrays.  XML Web Services One thing noticeably absent from XML-RPC is a way to represent data as an object. The protocol wasn’t designed with object-oriented programming in mind, but you can represent reasonably complex objects with the array and struct types. By design, XML-RPC is a simple remote procedure call protocol that is well suited to programming across a network. The protocol has become one of the key elements of web services implemented by many developers of software on Windows, Macintosh, Linux, and UNIX systems.
 More than 75 implementations of XML-RPC are available today for a variety of languages and platforms. After the release of XML-RPC, the specification was extended to create another RPC protocol called SOAP, the Simple Object Access Protocol. SOAP shares some of the design goals of XML-RPC but has been expanded to better support objects, user-defined data types, and other advanced features, resulting in a significantly more complex protocol. SOAP has also become widely popular for web services and other decentralized network programming.