|
In contrast to ONC RPC that has been
designed for local networks, XML-RPC is a remote procedure call protocol that
works over the Internet. An XML-RPC message is an HTTP-POST request. The body of
the request is in XML.
The XML Extensions of Distinct ONC
RPC/XDR for Java (in the following referred as JRPC-XML) turns an ONC RPC
server into a web service. It provides the following features:
- XML-RPC clients and servers can be generated from ONC RPC
(XDR)-Files.
- Client and server-side APIs are unchanged (i.e. it enables an
extremely simple transition from ONC RPC to XML RPC)
- Each JRPC-XML server is accessible simultaneously via ONC RPC
and XML-RPC.
- Automatic generation of an XML-RPC-to-ONC-RPC-translator (i.e.
direct integration of a legacy ONC RPC server into an XML-based
infrastructure)
JRPC-XML does this by extending the
Distinct ONC RPC for Java with additional support for XML. These extensions
include:
- The ability of Jrpcgen to generate XML-RPC client stubs for a
given XDR-description (.x-file) of an ONC RPC service and to extend the existing
ONC RPC client and server classes with new methods that allows you to use them
as XML-RPC services.
- A new serialization scheme and a type mapping that allows to
encode the RPC types not only to XDR transfer syntax but also to XML.
There are a number of different
scenarios in which JRPC-XML provides a unique tool for developing up-to-date
Web-Services reusing existing code and skills:
Scenario 1: Exposing an ONC-RPC server
to the Web
In many cases a required
functionality is implemented for many years by a robust and well-tested ONC RPC
server. The only new requirement is that this functionality should be exposed to
the Internet, possibly to clients that are not yet known and possibly designed
and deployed by other organizations. This reveals two problems: ONC RPC is a
protocol that is inherently hard to be run on the Internet. XML-RPC would be a
better protocol for this job. It fits perfectly in the Internet and client
libraries are available for nearly any programming environment. JRPC-XML can
expose an existing ONC RPC server to the Internet as an XML-RPC server with just
10 lines of java code.
Scenario 2: Easy replacement of ONC
RPC by XML-RPC
If you have existing ONC RPC code
that is mature and known to work, JRPC-XML allows you simply to replace the
protocols without further porting effort.
Scenario 3: Smooth introduction of new
XML-RPC-based clients
JRPC-XML also allows you to write new
XML-RPC based client applications that interact with the same ONC RPC server
that also services older ONC RPC clients.
Scenario 4: Easy development of new
XML-RPC-based applications
Finally, JRPC-XML is just an easy way
of writing XML-RPC client/server applications. While the main idea of XML-RPC is
its simplicity, it lacks two major features that are important for any more
larger client/server project: it has no interface definition language and, thus,
no automatic generation of client and server stubs. This handicap becomes
obvious as soon as more complex data-types are involved and hand-coding the subs
turn out to be an error-prone and time-consuming task. Here JRPC-XML provides an
easy solution, as it reuses the well-accepted XDR language for exactly this
purpose. Moreover, with JRPC-XML you don't even need to know about the details
of XML and XML-RPC to write an XML-RPC service. If you are used to writing ONC
RPC applications with Java, you can use your skills to write an XML-RPC service
with no additional effort.
XML-RPC is a trademark of UserLand Software, Inc.
|