Service Registry 3.1 Update 1 Developer's Guide

Retrieving Organization Attributes: Example

For an example of retrieving the attributes of an organization and the User that is its primary contact, see JAXRSearchOrg.java in the directory install/registry-samples/organizations/src, which displays information about an organization whose name contains a specified string.

ProcedureTo Run the JAXRSearchOrg Example

  1. Go to the directory install/registry-samples/organizations.

  2. Type the following command:


    Ant-base/ant search-org -Dorg=string
    

    For example, if you specify the argument gen, the output of the search-org target looks something like this:


    search-org:
         [java] Search string is gen
         [java] Query URL is http://localhost:6480/soar/registry/soap
         [java] Created connection to registry
         [java] Got registry service and query manager
         [java] Org name: GenericOrg
         [java] Org description: Generic organization
         [java] Org unique id: urn:uuid:f23cffcd-23d2-4171-ba41-f2d1547158f8
         [java] Org logical id: urn:uuid:f23cffcd-23d2-4171-ba41-f2d1547158f8
         [java] Org version: 1.1
         [java] Retrieving audit trail for organization
         [java] GenericOrg created 2007-07-20 04:32:34.0
         [java]  Postal Address:
         [java]   1 My Street
         [java]   My City, My Province My Code
         [java]   My Country ()
         [java]  Postal Address:
         [java]    
         [java]   ,  
         [java]    ()
         [java]  Contact name: My  Name
         [java]  Postal Address:
         [java]    
         [java]   Burlington, MA 
         [java]   US ()
         [java]   Phone number: +1 (111) 111-1111 (OfficePhone)
         [java]   Email address: me@here.com (OfficeEmail)
         [java]   URL: none
         [java] Retrieving audit trail for contact
         [java] Name, My created 2007-07-19 01:04:33.0
         [java] Contact version: 1.1
         [java]   Classification name is China
         [java]   Classification value is CN
         [java]   Classification scheme for China is iso-ch:3166:1999
         [java]   External link name is Java Technology
         [java]   External link description is Sun Java technology website
         [java]   External link URI is http://java.sun.com/
         [java]   External identifier name is Sun
         [java]   External identifier value is SUNW
         [java]   External identifier classification scheme is NASDAQ
         [java]   Slot name is urn:devguide:samples:organizationalUnit:Branch
         [java]   Slot value 1: Paris
         [java]   Slot type is urn:oasis:names:tc:ebxml-regrep:DataType:String
         [java]  --- 

    Note –

    Any organization that you create using a JAXR program will have two postal addresses: an empty one and the one you specify.