UDDI Utility Tool
The UDDI Utility Tool provides the ability to manage UDDI entities between UDDI registries. There are four main functions:
export
- Given an entity type and key, or a list of entity types and keys, the UDDI Utility Tool gets the UDDI entities from the specified registry and writes them to the UDDI Entity Definition File (an XML file - see below) according to a promoter tool specific schema (this schema is provided along with the UDDI Utility Tool, and includes the UDDI V2 schema). The UDDI Entity Defintion File separates entities by type, and automatically detects and records tModels referenced by the specified entities. The 'referenced tModels' section of the file can be used by the user to ensure a target registry includes any referenced tModels before they try to import new entities to that registry.
import
- Given a list of UDDI entities (which can be supplied using the UDDI Entity Definition File), or programmatically in a container object, the import function detects if the entities already exist in the target registry and, if they do not, creates a minimal entity ("stub") with the specified key. The entity is then published which has the effect of updating the minimal entity. It is important to note that the original key is maintained throughout.
promote
- The promote function combines the export and import steps such that the specified entities are extracted (by key) from the source registry and then imported into the target registry. the generation of a UDDI Entity Definition File is optional for this function.
delete
- This function deletes the specified entities (specified as an entity type and key list).
The UDDI Entity Definition File
This file can be generated by the export and promote functions, or the user can choose to create it (either by hand, or by modifying a version of the file output by the UDDI Utility Tool). It is the main input to the import function. When the file is parsed, it is validated for well formedness and that it complies with the promoter tool's schema. Below is an example that shows the five main sections for tModels, businesses, services, bindings and referencedTModels.
UDDI Entity Definition File example for canonical tModels
Examples
<?xml version="1.0" encoding="UTF-8"?> <promote:uddiEntities xmlns="urn:uddi-org:api_v2" xmlns:promote="urn:com.ibm.uddi:uddiPromote"> <!-- tModels --> <promote:tModels> <tModel tModelKey="uuid:ee3966a8-faa5-416e-9772-128554343571" > <name>http://schemas.xmlsoap.org/ws/2002/07/policytmodel</name> <description>WS-PolicyAttachment policy expression</description> </tModel> <tModel tModelKey="uuid:ad61de98-4db8-31b2-a299-a2373dc97212" > <name>uddi-org:wsdl:address</name> <description xml:lang="en"> This tModel is used to specify the URL fact that the address must be obtained from the WSDL deployment file. </description> <overviewDoc> <overviewURL> http://www.oasis-open.org/committees/uddi-spec/doc/tn/uddi-spec-tc-tn-wsdl-v2.html#Address </overviewURL> </overviewDoc> </tModel> </promote:tModels> <!-- businesses --> <promote:businesses> </promote:businesses> <!-- services --> <promote:services> </promote:services> <!-- bindings --> <promote:bindings> </promote:bindings> <!-- referenced tModels --> <promote:referencedTModels> </promote:referencedTModels> </promote:uddiEntities>
Invocation via the command line
The UDDI Utility Tool can be started using:
java - jar UDDIUtilityTools.jar
- using a specified properties file that sets up classpath and other parameters, or it can be called using:
java CommandLineProcessor
- where CommandLineProcessor is the class which processes command line arguements for the UDDI Utility Tool, sets up configuration and invokes the appropriate function.
The usage is as follows:
Usage message
Examples
Usage: java -jar UDDIUtilityTools.jar {function} [options] function: -promote <entity source> Promote entites between registries -export <entity source> Extract entities from registry to XML -delete <entity source> Delete entities from registry -import Create entities from XML to registry where <entity source> is one of: tmodel|business|service|binding <key> Specify single entity type and key -keysFile | -f <filename> Specify file containing entity types and keys options: -properties <filename> Specify path to configuration file -overwrite | -o Overwrite an entity if it already exists -log | -v Output verbose messages -definitionFile <filename> Specify path to UDDI entity definition file -importReferenced Import entities referenced by source entities The following options override property settings in configuration file: -overwrite -log -definitionFile -importReferenced java -jar UDDIUtilityTools.jar -promote -keysFile C:/uddikeys.txt
Note: If the importReferenced property is set to true, the list of tModels in the referencedTModels section will be imported to the target registry. Minimal entities are created if the referencedTModel is new. If the referencedTModel already exists it will never be overwritten, regardless of the overwrite property value. This is so that commonly referenced tModels such as categorization tModels do not keep being updated unnecessarily.
Should a user need to update a referencedTModel, they must manually move the referencedTModel definition to the tModels section in the definition file and set overwrite to true.
Invocation via the API
The tool provides a public API to drive the four functions programmatically. The user can choose to use the specific function classes directly.
Here is a typical usage:
- Create a Configuration object with the desired properties (you can use a properties file or a Properties object in the constructor).
- Create a PromoterAPI object with the Configuration instance.
- Set the entity keys or UDDI4J entities to act on using the setter method.
- Invoke the function required.
See the Javadocs for more information on the interfaces.
The corresponding method to call for each function is as follows:
export
- exportEntities() - after invoking setUDDIEntities(keysFile) or setUDDIEntity(entity type, key)
promote
- promoteEntities() - after invoking setUDDIEntites(keysFile) or setUDDIEntity(entity type, key)
import
- importEntities() - the UDDI Entity Definition FIle is specified in the configuration object
delete
- deleteEntities() - after invoking setUDDIEntities(kesFile) or setUDDIEntity(entity type, key)
IBM WebSphere UDDI Registry
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.