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

Adding New Users to the Registry

To add a new user to the Registry Server database, you use the registry-server-test script to generate a hash password and to run the Indri tool.

  1. Go to the directory <JWSDP_HOME>/samples/registry-server/xml.
  2. Open the file UserInfo.xml in an editor and change the values in the <fname>, <lname>, and <uid> tags to the first name, last name, and unique user ID (UID) of the new user. The <uid> tag is commonly the user's login name. It must be unique.
  3. Go back up to the directory <JWSDP_HOME>/samples/registry-server.
  4. Generate a hash password for the user by specifying the actual password as the value argument in the following command line:
    registry-server-test run-md5 -Dpassword=value
     
    
    For example, if you specify a password value of mypass, you get output like the following:
    D:\jwsdp-1_0\samples\registry-server>registry-server-test run-
    md5 -Dpassword=mypass
    Buildfile: D:\jwsdp-1_0\samples\registry-server\test-build.xml
    
    run-md5:
       [echo] -- Running md5 for auth --
       [java]
       [java]  The Value of the MD5 Hash is: a029d0df84eb5549
     
    
  5. Enter the hash value as the value of the <passwd> tag in UserInfo.xml. Do not modify the <tokenExpiration> or <authInfo> tag.
  6. Save the file, but do not exit the editor.
  7. Start the Indri tool:
    registry-server-test run-indri
     
    
  8. In the Collection panel on the top left side of the Indri window, select authinfo.
  9. In the Node ID field, enter the UID you specified for the new user.
  10. Enter testuser in the owner field.
  11. In the text editor, select and copy all the contents of the UserInfo.xml file, then paste them into the large text area labeled Node.
  12. Choose Create Node from the Database menu.
  13. To verify that the new user has been created, choose Clear Text Area from the Database menu, then retype the UID in the Node ID field. The data for the new user appears. Type testuser in the Node ID field to see the data for the default user.
  14. Close the UserInfo.xml file and exit the Indri tool.
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.