The JavaTM Web Services Tutorial
Home
TOC
Index
PREV TOP NEXT
Divider

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:


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.

Use the following command:

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.

  1. Choose Open from the File menu to open the file SaveBusiness.xml in the xml subdirectory. The contents of the file appear in the large text area labeled Node. Edit the contents if you wish.
  2. 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.
  3. In the Collection panel on the top left side of the Indri window, make sure uddi is selected.
  4. Enter testuser in the owner text field and press Enter.
  5. 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:

  1. Choose Clear Text Area from the Database menu to clear the Node text area.
  2. 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:

  1. Choose Clear Text Area from the Database menu to clear the Node text area.
  2. 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")]
     
    
  3. Click Find.
  4. Check the status area for a message like the following:
    query complete: 1 matches.
     
    
  5. 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:

  1. Select the business you saved and verify that its contents appear in the Node text area.
  2. Choose Delete Node from the Database menu.
  3. 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:

  1. Select uddi in the Collection panel on the top left side of the Indri window.
  2. Choose Index Collection from the Database menu. A list of all the current nodes appears in the XNodes panel. Select a node to display its content.
Divider
Home
TOC
Index
PREV TOP NEXT
Divider

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.