DISTRIBUTING APPLICATIONS WITH XML-RPC The ability to integrate applications and distribute work increases as organizations take advantage of networking technologies. Customers and partners are information-hungry and often look more seriously at companies that can provide better data, more data, and more real-time access to the data than firms that don't provide such services. A new protocol called XML-RPC is designed to help meet the distributed integration needs of these customers. In this week's XML TechMail, we'll look at this new protocol and how it might be able to help your organization. OVERVIEW XML-RPC is a new protocol that uses common technology, including Hypertext Transfer Protocol (HTTP) and eXtensible Markup Language (XML), to provide access to data in remote systems across a network. The goal is to create technology that is simple to understand and easy to use while sharing data among disparate and complex applications. Because HTTP is the common protocol used by Web browsers and Web servers to communicate, it is quite common and generally understood by most organizations. XML, obviously a top choice for describing complex structured data using a text-based document, is also easy to understand. REMOTE PROCEDURE CALLS The "RPC" in XML-RPC stands for Remote Procedure Call, which is technical jargon for accessing the data in a networked application. This is a technology used commonly by other networked applications such as databases and operating systems. The procedure is defined by an XML- RPC request. The request contains information that specifies what procedure to call and what kind of data to pass to it. You can think of this as a normal function call as used in any other programming language. For example, you might pass a username and password to a login procedure or a complete order to a commerce system. The data is sent to the procedure, and the procedure's return value is sent as an XML-RPC response back to the calling application. XML The basis of XML-RPC is the XML-RPC document type. This grammar specifies the format for both the XML-RPC request and the XML-RPC response. Each request document is sent as an HTTP request to a server that handles the XML-RPC protocol. The HTTP request is a standard HTTP POST request. The POST data is the XML document containing the XML-RPC request information. Within the request document are the parameters that define what procedure to call and what arguments to pass to that procedure. Once the request is made and the remote procedure has been called, the return value from the procedure is packaged into an XML-RPC response. This response is sent back to the calling program as an XML document. The XML document is actually sent as the content of the HTTP response. In addition to the return value, the XML-RPC response might also contain "fault" data, which is information regarding errors during the process of calling the remote procedure. SUMMARY With XML as the data format of choice and HTTP as the network protocol of choice, XML-RPC provides a simple implementation for accessing data across different systems. XML-RPC uses a clean approach based on the HTTP request-response model and the use of XML to represent both the request and the response. This technology helps reduce the complexities of integrating applications essentially to a Web page request. -------------------------------------------