Distinct®
ONC RPC/XDR Toolkit for JavaTM
Programming Guide Class Hierarchy Packages Index
Overview
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
contains the RPC runtime library. It complies with 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.
-
An rpcbind 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 compatibility.
-
The Jrpcgen compiler translates standard
RPC/XDR interface definition files into the Java source files that implement
the client and server side stubs as well as the XDR conversions for the
described interface. This means that Jrpcgen implements a Java language
mapping for the standard ".x" IDL files.
-
The RPCInfo utility displays a list of all the services registered with
the portmapper on a system. This utility can be used to query the 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 scripts allow you to execute
arbitrary RPCs on the internet where firewalls usually block protocols,
such as RPC, which do not use fixed ports. With RPCGw you can also call
RPC servers (from a Java applet) that are not located on the same host
as the web server. In order to preserve the integrity and the privacy of
your network, RPCGw uses a sophisticated access control list that allows
you to specify exactly which procedure of which RPC program and version
can be executed on which host via which protocol.
-
The demo 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.
Release Notes
-
This is version 3.0 of the Distinct ONC RPC/XDR Toolkit for Java.
-
Please note that Distinct ONC RPC/XDR for Java requires JDK version 1.1
or higher.
-
Secure RPC using AUTH_DES authentication has been added.
-
The RPCGw HTTP to RPC gateway is now also available in servlet and CGI
versions.
-
Support for the rpcbind protocol has been added.
Installation
To install the Distinct ONC RPC/XDR Toolkit for Java, simply copy all files
in this directory along with all files in all subdirectories to your local
hard disk. Make sure that the same directory structure is created in the
destination directory. All you need to do to start using the Distinct RPC
for Java classes is to add the parent directory of the "distinct" directory
(which in turn contains the "rpc" directory) to the CLASSPATH of the Java
compiler.
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 classes in the "distinct/rpc" (UNIX) or "distinct\rpc" (PC) directory
below the directory which contains the applet on the server.
All of the online documentation is in HTML format and can be accessed
either directly on the distribution CD or on the local hard disk. This
document contains links to all other parts of the online documentation
which includes a programming guide, a class hierarchy, a class reference
and an index.
Browser Security
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,
Microsoft
Internet Explorer 4.0. Especially look for the terms "applet security",
"signed code" (JAR files, CAB files), and "certificates".
Firewalls
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.
© 1997 - 1999 by Distinct
Corporation. Last Modified: February 16, 1999. Legal
Notices.