Many sample client programs that demonstrate JAXR features are described in this manual. If you installed the developer bundle for the registry, a zip file containing these examples is in the file ServiceRegistry-base/samples.zip.
Copy this zip file to any convenient location on your file system. After you unzip the file, the example source code is in the directory INSTALL/registry-samples, where INSTALL is the directory where you unzipped the examples.
Each example or group of examples has a build.xml file that allows you to compile and run each example using the Ant tool. Each build.xml file has a compile target and one or more targets that run the example or examples. Some of the run targets take command-line arguments.
On a system where the Service Registry developer bundle is installed, the ant command is in the following directory:
On Solaris OS: /usr/sfw/bin
On Linux and HP-UX systems: /opt/sun/share/bin
This manual refers to this directory as Ant-base.
The ant command requires the JAVA_HOME environment variable to be set. Ordinarily, you set this variable to the following value:
/usr/jdk/entsys-j2se
Before you run the examples, you must edit the build.properties file in the directory INSTALL/registry-samples/common. This file is used by the Ant targets that run the examples.
The other properties file, JAXRExamples.properties, is a resource bundle that is used by the examples themselves. It contains strings that you can modify at any time. The Ant targets that run the examples always use the latest version of the file.
In addition, a targets.xml file in the INSTALL/registry-samples/common directory defines the classpath for compiling and running the examples. It also contains a clean target that deletes the build directory created when each example is compiled. You do not need to edit this file.
You can find additional JAXR examples in the form of Junit tests at the SourceForge project web site. You can browse these examples online or follow the download instructions.
Set the property registry.home to the directory where the Registry is installed.
On Solaris OS: /opt/SUNWsrvc-registry
On Linux and HP-UX systems: /opt/sun/srvc-registry
Set the property share.dir to the directory where the Java ES shared components are located.
On Solaris OS: /usr/share
On Linux and HP-UX systems: /opt/sun/share
Set the property proxyHost to the name of the system through which you access the Internet, if you are behind a firewall.
If you are not sure what the value should be, consult your system administrator or another person with that information. The proxyPort value is set to 8080, the typical value; change this value if necessary.
Edit the properties query.url and publish.url to specify the URL of the Registry.
The file provides a default setting of localhost:6480 for the host and port. Change this setting to another host or port if the Registry is installed on a remote server or at a non-default port.
Edit the alias and password properties to specify the values that are required for publishing to the Registry. Make these edits after you use the User Registration Wizard of the Web Console. See Getting Access to the Registry for details.