XML-RPC

. In 1998, Userland (http://www.userland.com) began working with Microsoft on a standard mechanism for RPC. This mechanism worked across systems via TCP/IP, and was called XML-RPC. The XML in XML-RPC is actually a commentary on the implementation of the protocol itself; developers using XML-RPC client libraries should be familiar with the general XML-RPC format (much as a HTTP/HTML developer should be familiar with the basic HTTP formats). However, it’s possible to use XML-RPC without ever having to worry about the underlying XML messages.

One of the most popular implementations of XML-RPC was the so-called Helma XML-RPC libraries, which have since been donated to the Apache Software Foundation as Apache XML-RPC. Like all Apache libraries and projects, Apache XML-RPC is free, open source, and runs well on Mac OS X.

Before using web services on Mac OS X, I’ll show you a simple XML-RPC server and client implemented with Apache XML-RPC.

Installation and Setup

This example builds on material taught earlier in the book, which created a web services server and a graphical client.

The xmlrpc-1.1.jar file contains the Apache XML-RPC libraries. This file is available from http://xml.apache.org/xmlrpc/ under the download binaries section (http://xml.apache.org/dist/xmlrpc/release/v1.1/xmlrpc-1.1.zip as of this writing). Once you have this file, set up the directory structure shown in Figure 15-1. You’ll notice that the XML-RPC JAR file was placed in the lib directory. It is then referenced ...

Get Mac OS X for Java Geeks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.