Prerequisites and Preparatory Steps: Code

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: REGISTRY_HOME\demos\env.properties Windows: REGISTRY_HOMEdemosenv.properties UNIX: 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 env.properties. This file is located in the same directory as the file run.sh run.bat. Local level properties for the Advanced Inquiry demos are loaded from the file: REGISTRY_HOME\demos\advanced\inquiry\env.properties Windows: REGISTRY_HOMEdemosadvancedinquiryenv.properties UNIX: Table 7. Properties Used in Demos Description Default Value Name limit of data returned from registry 5 uddi.demos.result.max_rows the extended inquiry web service port URL http:localhost:8888registryuddiinquiryExt uddi.demos.url.inquiryExt

2.1.2. Presentation and Functional Presentation

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: REGISTRY_HOME\demos\advanced\inquiry\src\demo\uddi\rq\FindBusiness.java Windows: REGISTRY_HOMEdemosadvancedinquirysrcdemouddirqFindBusiness.java UNIX: The helper method createFindBusiness creates a FindBusiness structure: public Find_business createFindBusinessString tModelKey, String keyValue, String operator, String quantifier throws InvalidParameterException { System.out.printlntModelKey = + tModelKey; System.out.printlnkeyValue = + keyValue; System.out.printlnoperator = + operator; System.out.printlnquantifier = + quantifier; Find_business find_business = new Find_business; QualifiedKeyedReference qualifiedKeyedReference = new QualifiedKeyedReference; qualifiedKeyedReference.setTModelKeytModelKey; qualifiedKeyedReference.setKeyValuekeyValue; qualifiedKeyedReference.setFindQualifierArrayListparseFindQualifiersoperator, quantifier; find_business.setCategoryBagnew CategoryBagnew KeyedReferenceArrayListqualifiedKeyedReference; find_business.setMaxRowsnew IntegerMAX_ROWS; Page 670

2.1.2. Presentation and Functional Presentation

return find_business; } The findBusiness method performs the searching operation: public BusinessList findBusinessFind_business find_business throws UDDIException, SOAPException { System.out.printCheck structure validity .. ; try { find_business.check; } catch InvalidParameterException e { System.out.printlnFailed; throw new UDDIExceptione; } System.out.printlnOK; UDDI_Inquiry_PortType inquiry = getInquiryStub; System.out.printSearch in progress ..; BusinessList businessList = inquiry.find_businessfind_business; System.out.println done; return businessList; }

2.1.3. Building and Running Demos

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 REGISTRY_HOME\demos\advanced\inquiry Windows REGISTRY_HOMEdemosadvancedinquiry UNIX 3. Build demo using: UNIX: Windows: .run.sh make run.bat make Note 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 Page 671

2.1.3. Building and Running Demos