This example, in the directory <JWSDP_HOME>/jaxr/samples/jaxr-publish, shows how to use the JAXR APIs to publish information about an organization to a registry, including information about services provided by the organization and contact information.
The example also illustrates how to classify registry entries using well-known classification schemes like the North American Industry Classification System (NAICS) and standard identifiers like the Dun & Bradstreet DUNS identifier.
You can publish to any registry you wish by setting the following
properties in the publish.properties
file:
Note: The URLs for the public registries can be found here: http://www.uddi.org/find.htmlquery.url
: the URL for sending queries to the registrypublish.url
: the URL for publishing data to the registry
To publish data to any of the public registries, you need to register first with the registry provider.
http.proxy.host
http.proxy.port
On Windows systems, at the prompt, type .\BLCM.
On UNIX systems, at the prompt, type ./BLCM.sh.
You should see the following message for a successful run:
Organization Saved
You may ignore the warning messages about PostalAddressMappings.
This example, in the directory <JWSDP_HOME>/jaxr/samples/jaxr-query, shows how to use the JAXR APIs to query a registry for data -- specifically, how to query for an organization by name. The example also illustrates how to parse the retrieved information for details about the organization and the services it provides.
Before running the example, configure it as follows:
query.url: the URL for sending queries to the registry
publish.url: the URL for publishing data to the registry
The URLs for the public registries can be found here: http://www.uddi.org/find.html.
http.proxy.host
http.proxy.port
company
variable in the source code. By default, the sample
uses the search string %USA%
, which returns any name containing
"usa" or "USA", including the organization published in the
jaxr-publish sample.On Windows systems, at the prompt, type .\BQM.
On UNIX systems, at the prompt, type ./BQM.sh .
You should see the following message for a successful run, followed by information about the registry entries retrieved:
Successfully queried the registry for organizations matching ....
This is a more sophisticated example showing how to use the JAXR APIs to provide a common interface to heterogenous registries. The registry interactions using the JAXR APIs are all illustrated in the JAXRClient source code. The example is in the directory <JWSDP_HOME>/jaxr/samples/jaxr-browser.
If you will run the browser from behind a firewall, make sure that you have set the http.proxyPort and http.proxyHost properties in the file <JWSDP_HOME>/conf/jwsdp.properties.
The scripts for starting the browser are located under <JWSDP_HOME>/jaxr/bin.
On Windows systems: .\jaxr-browser
On UNIX systems: ./jaxr-browser.sh
./jaxr-browser.sh http-proxy-host http-proxy-port https-proxy-host https-proxy-port
The entire command should be typed on one line.
Several of the commonly used URLs are preconfigured in the list, but you can also specify your own here.
To publish information to the registry, select the Submissions Panel. Make sure you have the publishing URL selected for the Registry Location. Fill in the information to publish and click Submit. It brings up an authentication dialog. Type in the username and password for your account on the registry and click OK to publish the entry to the registry.
For complete details on using the browser, refer to the Java Web Services Tutorial.
Copyright © 2004 Sun Microsystems, Inc. All rights reserved.