Home
TOC Index |
Using the Indri Tool to Access the Registry Server Database
The Indri tool provides a graphic user interface (GUI) that allows you to access the Registry Server database directly. You can use this tool to do the following:
- Save businesses
- Obtain business details
- Find businesses
- Delete businesses
- List the contents of the database
Note: The Indri is a large lemur. It is reported that when Europeans first arrived in Madagascar, they heard its cry from the trees and asked what was making that sound. The reply was "Indri! Indri!" which is Malagasy for "Look up! Look up!" This seems an appropriate name for a database lookup tool.
You invoke the Indri tool through the
registry-server-test
script in the directory<
JWSDP_HOME
>
/samples/registry-server
.registry-server-test.sh run-indri (UNIX systems) registry-server-test run-indri (Microsoft Windows systems)To exit the Indri tool, choose Exit from the File menu.
Saving a Business
To save a business, perform the following steps.
- Choose Open from the File menu to open the file
SaveBusiness.xml
in thexml
subdirectory. The contents of the file appear in the large text area labeled Node. Edit the contents if you wish.- Choose Check Content from the Process menu and verify that the message
document is well-formed
- appears in the status area at the bottom of the Indri window.
- In the Collection panel on the top left side of the Indri window, make sure
uddi
is selected.- Enter
testuser
in the owner text field and press Enter.- Choose Create Node from the Database menu. The message
node 'nid' in collection 'uddi' created
- appears in the status area.
Obtaining Business Details
To obtain business details, perform the following steps:
- Choose Clear Text Area from the Database menu to clear the Node text area.
- Choose Get Node from the Database menu. The XML code you submitted when you saved the business appears in the text area.
Finding a Business
To find a business by name, perform the following steps:
- Choose Clear Text Area from the Database menu to clear the Node text area.
- Copy the following string into the XPath Query text field. If necessary, replace "Alter" with a string that appears in the name of the business you saved.
//uddi:businessEntity/uddi:name[contains(text(),"Alter")]- Click Find.
- Check the status area for a message like the following:
query complete: 1 matches.- If there are any matches, select a node from the XNodes panel on the bottom left side of the Indri window. The content of the node appears in the Node area.
Deleting a Business
To delete a business, perform the following steps:
- Select the business you saved and verify that its contents appear in the Node text area.
- Choose Delete Node from the Database menu.
- Choose Index Collection to verify that the node is no longer there.
You should delete the node you saved by using the contents of
SaveBusiness.xml
. Because you saved this message directly to the database instead of sending it to the Registry Server and getting a response, it lacks a business key and will therefore generate exceptions if you use the JAXR API or the Registry Browser to search for it.Displaying Database Contents
To get a list of all businesses currently in the database, perform the following steps:
Home
TOC Index |
This tutorial contains information on the 1.0 version of the Java Web Services Developer Pack.
All of the material in The Java Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.