The Distinct ONC RPC/XDR Toolkit for Java enables you to write standard ONC RPC clients and servers in pure
JavaTM. For help on how to create a client or server application in Java using this toolkit see the
Programming Guide. To locate the reference portions of this document click on the relevant links below. This overview includes important installation information as well as release notes. If you are not yet familiar with this product please take a moment to read this before proceeding.
The Distinct ONC RPC/XDR Toolkit for Java consists of the following components.
The Distinct ONC
RPC/XDR for Java package that contains the ONC RPC/XDR run
time libraries that conform to RFC 1831 (RPC: Remote Procedure
Call Protocol Specification Version 2) and RFC 1832 (XDR:
External Data Representation Standard). The API consists of
classes that allow you to write pure Java clients, for standard
RPC servers, that can be embedded in applets and be run by a
standard Web browser. It also allows you to develop ONC RPC
stand-alone servers. The package allows connections over TCP,
UDP or encapsulated over HTTP.
application in Java that implements the rpcbind protocol version
3 and 4. A portmapper application in Java that implements
portmap interface version 2 is included for backward
compiler that translates standard RPC/XDR interface definition
files into the sources of a Java class that implements the
client-and server side stubs and the XDR conversions for the
described interface. This means Jrpcgen implements a certain
Java language mapping for .x IDL files. Starting with version 5,
jrpcgen also includes an option to generate XML-RPC.
utility displays a list of all the services registered with the
portmapper on a system. This utility can be used to query the
rpcbind or portmapper on the local host (by specifying "localhost"
or no host name at all on the command line) or on a remote host
(by specifying the name of the host as a command line argument).
Source code for the RPCInfo utility is included for reference.
The RPCGw CGI
script that allows the execution of RPCs over the Internet
where firewalls are blocking all protocols, which do not use
fixed ports, such as RPC. With RPCGw you can also call RPC
servers (from a Java applet) that are not located on the same
host as the web server but elsewhere in your LAN. In order to
preserve the integrity and the privacy of your LAN, RPCGw uses a
sophisticated access control list that allows you to specify
exactly which procedure of which RPC program/version number can
be executed on which host via which protocol.
application consists of an XDR file which describes an
interface of a very simple counter server, the server
implementation, and a demo applet (along with an HTML page) that
invokes the server when the user clicks on it. An additional
utility queries the portmapper on the server (which may be the
local host) to check if the counter server is currently running.
Also included is a demo application which illustrates how to
make broadcast RPCs to locate a server.
The Distinct ONC RPC/XDR Toolkit for Java
5.0 includes support for:
- Secure RPC through AUTH_DES.
- Secure communication between a
Distinct RPC for Java client and server over SSL.
- HTTP tunneling over SSL
- An ONC RPC/XDR bridge to XML RPC.
You can now essentially turn an existing ONC RPC Server into a web
service, making it accessible to XML-RPC clients.
for Version 5.0
Version 5.0 is a major release version that contains enhancements as
well as all patches that were previously made available for version 4.0.
The following is a list of the major enhancements included in this release:
Support for secure transactions using RPC over SSL has been added. This requires Sun's JSSE 1.0.1. "ClientTCPx.class" has been added to create clients which will use
SSL to communicate with the server.
Warning: The use of SSL is subject to US export regulations that you must familiarize yourself with, and make sure you are able to comply with, before you use this feature.
HTTP Tunneling over SSL
It is now possible to make use of the HTTP tunneling feature over a secure connection
JRPC-XML support has been added allowing you to turn an ONC RPC Server into a
web service. Support includes automatic generation of an XML-RPC-to-ONC-RPC-translator, allowing direct integration of a legacy ONC RPC server into an XML-based infrastructure.
The Jrpcgen compiler has been modified to support XML types. Command line options -x and -X have been added. -x to produce XML-RPC support and -X to provide the exact XML-RPC package.
All the classes have been put into a jar file named djrpc.jar, except for
the RPCInfo.class and Jrpcgen.class which are installed in the root folder.
New Samples: SSL and XML
New samples have been added to show the use of these new features. The new
samples can be found in the SSL and XML directories. A sample for HTTP
tunneling over SSL has also been added (HTTPS).
After installing the Distinct ONC RPC/XDR for Java Toolkit make sure
that the CLASSPATH environment
variable is updated.
The directory in which Distinct ONC RPC/XDR
for Java Toolkit is installed should be added to your
CLASSPATH and "djrpc.jar" which is under the same
directory should also be added.
For example if the installation
directory is C:\JRPCv5 then you should have this added to your
CLASSPATH = %CLASSPATH%;C:\JRPCv5;C:\JRPCv5\djrpc.jar
If you are using the
Distinct RPC for Java classes to develop an applet which will reside
on the server, you should install the Distinct RPC for Java (jar
files) in the same directory which contains the applet on the
By default all Java-enabled browsers do not allow network connections to hosts other than the one an applet was loaded from. In order to connect your applet to arbitrary RPC servers (or to run an RPC server inside a browser), additional steps are required to get around this restriction.
Either install the RPC application in your local browsers CLASSPATH (similar to a "Helper Application"). This approach is not recommended.
Or use one of the certification/capabilities methods to load your applets as trusted code into a less restricted security domain.
Unfortunately both methods are currently browser specific. Please check your browser manual for further information or take a look at the security features of
Netscape Communicator, HotJavaTM,
Explorer. Especially look for the terms "applet security", "signed code" (JAR files, CAB files), and "certificates".
Most RPC applications are designed for Intranets, and although RPC can be made to run over the Internet, the original specifications were not really designed for this. On the Internet connections over arbitrary ports (like those established by the RPC protocol) are often blocked by firewalls. Please ask your firewall administrator for the details of your network security.
Distinct ONC RPC/XDR for Java allows you to build servers and clients with well known (fixed) server ports. Depending on the configuration of your firewall this might already help to access certain servers from the Internet. Distinct ONC RPC/XDR for Java also comes with a powerful mechanism that wraps RPC requests completely with standard HTTP transactions. The server side CGI script
(RPCGw) together with an RPC protocol client
(ClientHTTP) allow transparent tunneling of the RPC protocol using HTTP. This mechanism allows the execution of arbitrary RPCs on the Internet where firewalls are blocking all protocols, such as RPC, that do not use fixed ports. It also allows you to call RPC servers, from a Java applet, that are not located on the same host as the web server but are elsewhere in your LAN. With this feature you can easily separate the web server from other application or database servers. HTTP
Tunneling can be done over a secure connection.