Service Registry 3.1 Update 1 Developer's Guide

Organizing Objects Within Registry Packages: Examples

For examples of using registry packages, see JAXRPublishPackage.java and JAXRSearchPackage.java in the directory install/registry-samples/packages/src. The first example publishes a RegistryPackage object that includes all objects in the Registry whose names contain the string "free". The second example searches for this package and displays its contents.

ProcedureTo Run the JAXRPublishPackage and JAXRSearchPackage Examples

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

  2. Type the following command:


    Ant-base/ant pub-pkg
    

    The output of the pub-pkg target looks something like this:


    pub-pkg:
         [java] Query URL is http://localhost:6480/soar/registry/soap
         [java] Publish URL is http://localhost:6480/soar/registry/soap
         [java] Created connection to registry
         [java] Established security credentials
         [java] Got registry service and life cycle manager
         [java] Package ID is urn:uuid:182e383b-1244-4e9f-9439-bddac093ebe7
         [java] Object type is ClassificationNode
         [java] Object name: Household Refrigerator and Home Freezer Manufacturing
         [java] Object type is ClassificationNode
         [java] Object name: Freestanding Ambulatory Surgical and Emergency Centers
         [java] Object type is Federation
         [java] Object name: freebXMLRegistryFederation
         [java] Object type is Organization
         [java] Object name: freebXMLRegistry
         [java] Object type is Registry
         [java] Object name: freebXMLRegistry
         [java] Package saved
  3. Type the following command:


    Ant-base/ant search-pkg
    

    The output of the search-pkg target looks something like this:


    search-pkg:
         [java] Query URL is http://localhost:6480/soar/registry/soap
         [java] Created connection to registry
         [java] Got registry service and query manager
         [java] Contents of FreePackage:
         [java]  Object type is Registry
         [java]  Object name: freebXMLRegistry
         [java]  Object description: freebXML Registry
         [java]  Object key id: urn:uuid:48b099a8-ed72-454e-9075-a6f96bd1280a
         [java]  Object type is Federation
         [java]  Object name: freebXMLRegistryFederation
         [java]  Object description: freebXML Registry Federation
         [java]  Object key id: urn:uuid:51f410c3-de34-47f6-845d-eeda495c458a
         [java]  Object type is ClassificationNode
         [java]  Object name: Household Refrigerator and Home Freezer Manufacturing
         [java]  Object description: null
         [java]  Object key id: urn:uuid:4f368d2d-25a4-413f-8609-a91166f1333f
         [java]  Object type is ClassificationNode
         [java]  Object name: Freestanding Ambulatory Surgical and Emergency Centers
         [java]  Object description: null
         [java]  Object key id: urn:uuid:ad381518-6986-444d-95ba-e62d85e2e84a
         [java]  Object type is Organization
         [java]  Object name: freebXMLRegistry
         [java]  Object description: freebXML Registry
         [java]  Object key id: urn:freebxml:registry:Organization:freebXMLRegistry