Advanced Inquiry - Range Queries  Locate

The Oracle Service Registry Range queries demos set demonstrates, how to use Oracle Service Registry inquiry enhancement - Range Queries. Oracle Service Registry range queries functionality allows you to search UDDI entities with the ability to use comparative operators (>, <) for matching keyValues in keyedReferences.

The demos set includes the following demo:

Prerequisites and Preparatory Steps: Code  Locate

We expect that you have already installed the Oracle Service Registry and set the REGISTRY_HOME environment variable to the registry's installation location.

To run the Oracle Service Registry's demos, your registry must be running.

It is necessary to configure the demos. The configuration system has two levels: global and local. The properties defined at the global level may be overwritten at the local level. The global properties are located in the file:

Windows: %REGISTRY_HOME%\demos\

The values set during the installation of the Oracle Service Registry work out of box, and their modification affects all demos. If you need to redefine the value of some property for a single demo (that is, at the local level), edit This file is located in the same directory as the file (run.bat). Local level properties for the Advanced Inquiry demos are loaded from the file:

Windows: %REGISTRY_HOME%\demos\advanced\inquiry\
UNIX: $REGISTRY_HOME/demos/advanced/inquiry/

Table 7. Properties Used in Demos

NameDefault ValueDescription
uddi.demos.result.max_rows5limit of data returned from registry
uddi.demos.url.inquiryExthttp://localhost:8888/registry/uddi/inquiryExtthe extended inquiry web service port URL

Presentation and Functional Presentation  Locate

This section describes the programming pattern used in demos using the FindBusiness demo as an example. You can find its source code in the file:

Windows: %REGISTRY_HOME%\demos\advanced\inquiry\src\demo\uddi\rq\
UNIX: $REGISTRY_HOME/demos/advanced/inquiry/src/demo/uddi/rq/

The helper method createFindBusiness creates a FindBusiness structure:

public Find_business createFindBusiness(String tModelKey, String keyValue,
                                        String operator, String quantifier)
        throws InvalidParameterException {
    System.out.println("tModelKey = " + tModelKey);
    System.out.println("keyValue = " + keyValue);
    System.out.println("operator = " + operator);
    System.out.println("quantifier = " + quantifier);

    Find_business find_business = new Find_business();
    QualifiedKeyedReference qualifiedKeyedReference = new QualifiedKeyedReference();
    qualifiedKeyedReference.setFindQualifierArrayList(parseFindQualifiers(operator, quantifier));
    find_business.setCategoryBag(new CategoryBag(new KeyedReferenceArrayList(qualifiedKeyedReference)));
    find_business.setMaxRows(new Integer(MAX_ROWS));

    return find_business;

The findBusiness method performs the searching operation:

public BusinessList findBusiness(Find_business find_business) throws UDDIException, SOAPException {
    System.out.print("Check structure validity .. ");
    try {
    } catch (InvalidParameterException e) {
        throw new UDDIException(e);

    UDDI_Inquiry_PortType inquiry = getInquiryStub();
    System.out.print("Search in progress ..");
    BusinessList businessList = inquiry.find_business(find_business);
    System.out.println(" done");
    return businessList;

Building and Running Demos  Locate

This section shows, how to build and run the Oracle Service Registry Advanced Inquiry demo set. Let us continue with our FindBusiness demo.

  1. Be sure that the demo are properly configured and the Oracle Service Registry is up and running.

  2. Change your working directory to

    Windows %REGISTRY_HOME%\demos\advanced\inquiry
    UNIX $REGISTRY_HOME/demos/advanced/inquiry

  3. Build demo using:

    run.bat make./ make


    When compiling demo on Windows platforms, you may see the following text:

    A subdirectory or file ..\..\common\.\build\classes already exists.

    . This is expected and does not indicate a problem.

  4. To get list of all available demos, run

    Windows: run.bat help
    UNIX: ./ help

  5. The selected demo can be executed via the run command using the name of the demo as a parameter. For example, to run the FindBusiness demo, invoke

    Windows: run.bat FindBusiness
    UNIX: ./ FindBusiness

    The output of this demo will resemble the following:

    Searching for businesses by category where keyedReference
    Enter tModelKey []:
    Enter keyValue [1]: 3
    Enter operator (=,<,>,<=,>=,<>) [=]:>
    Enter quantifier (exists,notExists) [exists]:
    tModelKey =
    keyValue = 3
    operator = >
    quantifier = exists
    Check structure validity .. OK
    Using Inquiry at url .. done
    Search in progress .. done
    Displaying 1 of 1, starting at position 1
    Business 1 :
    <businessInfoExt businessKey="" xmlns="">
      <name xmlns="urn:uddi-org:api_v3">IT</name>
      <description xmlns="urn:uddi-org:api_v3">IT department</description>
      <serviceInfos xmlns="urn:uddi-org:api_v3">
        <serviceInfoExt serviceKey="" businessKey="" xmlns="">
          <name xmlns="urn:uddi-org:api_v3">Support</name>
          <description xmlns="urn:uddi-org:api_v3">Telephone support</description>
          <bindingTemplates xmlns="urn:uddi-org:api_v3">
            <bindingTemplate bindingKey="uddi:b77eb8f0-86ce-11d8-ba05-123456789012" serviceKey="">
              <description>IT related issues shall be reported there</description>
              <accessPoint useType="endPoint">tel:+1-123-456-7890</accessPoint>
                <tModelInstanceInfo tModelKey=""/>
        <serviceInfoExt serviceKey="" businessKey="" xmlns="">
          <name xmlns="urn:uddi-org:api_v3">EmployeeList</name>
          <description xmlns="urn:uddi-org:api_v3">wsdl:type representing service</description>
          <bindingTemplates xmlns="urn:uddi-org:api_v3">
            <bindingTemplate bindingKey="uddi:5c546520-78b8-11d8-bec4-123456789012" serviceKey="">
              <description>wsdl:type representing port</description>
              <accessPoint useType="">urn:unknown-location-uri</accessPoint>
                <tModelInstanceInfo tModelKey="">
                <tModelInstanceInfo tModelKey="">
                <keyedReference tModelKey="" keyName="" keyValue=""/>
                <keyedReference tModelKey="" keyName="" keyValue="port"/>
                <keyedReference tModelKey="" keyName="" keyValue="EmployeeList"/>
                <keyedReference tModelKey="" keyName="Available" keyValue="Available"/>
                <keyedReference tModelKey="" keyName="Operational" keyValue="Operational"/>
        <contactInfo useType="Technical support">
          <personName xmlns="urn:uddi-org:api_v3">John Demo</personName>