Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 7 Using Category Systems : Using Checked Categories

Using Checked Categories
This section describes how to use checked categories.
Publishing a Checked Category
To publish a checked category:
1.
Deploy a validation web service that provides the get_allValidValues API (for categories with their values for validation cached) or the validate_values API (for categories with their values for validation not cached).
2.
Publish a tModel for the checked category. The tModel must be categorized by the built-in checked category. In addition, if the checked category is cacheable, the checked category must also be categorized by the built-in cacheable category.
3.
Publish a binding template for the above-mentioned web service in the same UDDI registry as the tModel belongs to, with its technical fingerprint referencing the tModel whose key is uddi-org:valueSetCaching_v3 (for the cacheable category) or uddi-org:valueSetValidation_v3 (for the non-cacheable category) and the tModel published in step 2.
4.
Update the above published tModel to have it point to the above binding template through the category whose UDDI key is uddi-org:validatedBy so that all the references to the value set of this category will be checked.
Checked Category Examples
There are two ways to do validation for a checked category. The following examples demonstrate how to use a checked category based on different validation types.
Using a Cached Category
This example demonstrates how to use a customized web service to check if a value belongs to a checked and cacheable category. The value validated in the example is referenced by the keyValue in a keyedReference element of a categoryBag element. The cached category is referenced by the tModelKey in the keyedReference element of the categoryBag element.
The valid version numbers are defined in the WEB-INF/classes/config.properties file wrapped in the war file.
To run the example:
1.
Download the JAX-WS 2.1.4 project from https://jax-ws.dev.java.net and install it. Copy the lib folder from the JAS-WS installation directory to the following directory:
UDDI_HOME/sample/data/taxonomy/checked-cachedvalue
2.
Open a command line window and change the path to UDDI_HOME/sample/data/taxonomy/checked-cachedvalue.
3.
Build the cachedValueValidationWebservice.war file in the war directory by executing the following command:
4.
Deploy cachedValueValidationService.war in a web container.
Replace the string http://localhost:8080/ in the publish_binding.xml file with http://Host:Port/, where Host is the host name or IP address of the web container; Port is the web container port.
5.
To publish the binding template, execute one of the following commands by using the data file publish_binding.xml file under the UDDI_HOME/sample/data/taxonomy/checked-cachedvalue directory.
6.
To publish the tModel, execute one of the following commands by using the data file publish_tModel.xml under the UDDI_HOME/sample/data/taxonomy/checked-cachedvalue directory.
7.
To publish a valid service, execute one of the following commands by using the data file publish_service_data_valid.xml under the UDDI_HOME/sample/data/taxonomy/checked-cachedvalue directory.
8.
To publish an invalid service, execute one of the following commands by using the data file publish_service_data_invalid.xml under the UDDI_HOME/sample/data/taxonomy/checked-cachedvalue directory.
Using an Uncached Category
This example demonstrates how to use a customized web service to check if a value belongs to a checked and uncached category. The value validated in the example is referenced by the keyValue in a keyedReference element of a categoryBag element. The uncached category is referenced by the tModelKey in the keyedReference element of the categoryBag element.
To run the example:
1.
Download the JAX-WS 2.1.4 project from https://jax-ws.dev.java.net and install it. Copy the lib folder from the JAS-WS installation directory to the following directory:
UDDI_HOME/sample/data/taxonomy/checked-uncachedvalue
2.
Open a command line window and change the path to UDDI_HOME/sample/data/taxonomy/checked-uncachedvalue.
3.
Build the uncachedValueValidationWebservice.war file in the war directory by executing the following command:
4.
Deploy uncachedValueValidationService.war in a web container.
Replace the string http://localhost:8080/ in the publish_binding.xml file with http://Host:Port/, where host is the host name or IP address of the web container; Port is the web container port.
5.
To publish the binding template, execute one of the following commands by using the data file publish_binding.xml under the UDDI_HOME/sample/data/taxonomy/checked-uncachedvalue directory.
6.
To publish the tModel, execute one of the following commands by using the data file publish_tModel.xml under the UDDI_HOME/sample/data/taxonomy/checked-uncachedvalue directory.
7.
To publish a valid service, execute one of the following commands by using the data file publish_service_valid.xml under the UDDI_HOME/sample/data/taxonomy/checked-uncachedvalue directory.
8.
To publish an invalid service, execute one of the following commands by using the data file publish_service_invalid.xml under the UDDI_HOME/sample/data/taxonomy/checked-uncachedvalue directory.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved