Summary
This article is based on the UDDI chapter in Building Web Services (Sams), a book I've written with Doug Davis, Steve Graham, Yuichi Nakamura, and Ryo Neyama from IBM, Toufic Boubez from Saffron Technology, and Glen Daniels from Macromedia. It's scheduled for release early next month.
This article is based on the UDDI chapter in Building Web Services (Sams), a book I've written with Doug Davis, Steve Graham, Yuichi Nakamura, and Ryo Neyama from IBM, Toufic Boubez from Saffron Technology, and Glen Daniels from Macromedia. It's scheduled for release early next month. Moving from the introduction to the UDDI information model and APIs in last month's XML-J (Vol. 2, issue 10), this month we'll take a detailed look at the UDDI categorization and classification mechanisms and the magic of UDDI tModels. One of the main objectives of the UDDI registries is the discovery of services, whether statically (design time) or dynamically (runtime). This entails a form of search through a large space of entries. In a reasonably populated registry, depending on the search mechanism, this could return a very large set of hits. An early requirement for UDDI therefore was a way to perform intelligent searches. Until we get closer to a truly Semantic Web, the best mechanism to facilitate such searches will continue to be through property-based lookup and taxonomic categorization and classification.
Property-Based Lookup
Formalizing the notion of property-based search is relatively easy to do. We need a mechanism to attach any number of properties to a piece of data. Properties need to have names and values. So far so good. The only complication has to do with supporting a naming system that allows for precision and extensibility without introducing much complexity. Precision of naming has to do with the ability to identify the precise meaning of a property name. Take, for example, a property whose name is name. Is this a company's name, a person's name, or the name of a country? XML has addressed this problem for element names with the introduction of namespaces. Namespaces aren't unique to XML. They're extensively used in other areas such as programming languages to provide specific meaning to simple names. Namespaces allow us to distinguish between the property "name" in the company namespace and the property "name" in the personal information namespace. In UDDI properties are called identifiers. Most UDDI data structures can support any number of properties inside an identifierBag element. The properties are represented by keyedReference elements that have three attributes:
<identifierBag>In this example the key UUID:8609C81E-EE1F-4D5A-B202-3EB13AD01823 identifies the space of the D&B D-U-N-S numbers. Simple property-based searching is easy to do, but it lacks the power to express search constraints that have to do with subselection and membership to multiple categories. For example, if a business manufactures skateboards, it is a manufacturer in the general sense of the term and a manufacturer of light equipment and of sporting goods and of skateboards. To navigate these types of concepts we need category-based search.
Categorization and Classification
<categoryBag>In this example the key UUID:C0B9FE13-179F-413D-8A5B-5004DB8E5BB2 identifies the NAICS categories while the key UUID:4E49A8D6-D5A2-4FC2-93A0-0411D8D19E88 identifies ISO 3166 standard for geographic location classifications.
The UDDI tModel Concept
What Is a tModel?
The tModel Data Structure
The simplicity of the tModel data structure makes it a powerful concept, but it can also be a double-edged sword. On the one hand, because of the simplicity in defining a tModel, people can specify anything they want, even if it's not useful to or reusable by anyone else. On the other hand, if used properly, tModels can be used to specify the standards and templates that will be used for the next generation of e-business on the Web. Throughout the UDDI data structures, tModels are used as references. By convention, the UDDI specification suggests two main uses for them:
An example of how these models can be put to use are the definitions of the UDDI APIs, which are referred to as tModels because they're well defined and agreed upon through the UDDI specification. These tModels are all classified in the UDDI Type tModel namespace as being of types "specification," "xmlSpec," and "soapSpec." Listing 1 shows the definition of the UDDI inquiry API. Through the UDDI publishing API, organizations or businesses can define, create, and publish their own tModels. In fact, they can even create their own taxonomies using tModels.
Third-Party Taxonomies
Why would anyone want to define a new taxonomy? UDDI provides, by default, the three canonical taxonomies: NAICS, for industry classifications, UN/SPSC, for product/service, and ISO 3166, for geographic classifications. These are general-purpose taxonomies that are quite useful for broadly classifying businesses or services. However, a particular industry might want to define a new taxonomy to detail product classifications according to a scheme commonly used in their industry. A third-party quality of service (QoS) guarantor may wish to define an identifier scheme, classifying businesses and their services according to some new QoS metric for Web services. Organizations may choose to convert their product codes into a taxonomy and categorize which businessService entries are associated with requesting, purchasing, and getting postsales support on each of their products.
Example Taxonomy
In this way the businessService entries in WeMakeIt Inc.'s partner catalog UDDI are all classified according to the parts code. When WeMakeIt Inc. needs to reorder a part, it can issue a taxonomy-based find operation and retrieve all the business partners that deal in that part. WeMakeIt Inc. can then issue RFQs, purchase orders, and the like to resupply a manufacturing line, or to just-in-time prepare for an upcoming manufacturing run. Let's examine the steps WeMakeIt Inc. would use to set up their third- party taxonomy based on the existing product code scheme. The company would create a tModel to describe their product code taxonomy and register it in the UDDI Business Registry using the save_tModel API (see Listing 2). The UDDI registry will assign a tModelKey, say, UUID:E0AC1230-4CC1-11D5-B353-B4D70FD31643. WeMakeIt Inc. would tell all of its suppliers to get this tModel and use it to classify their businessEntity and businessServices according to which of these product codes the supplier provides. The following is an example of how the parts-ordering service of a midsized widget manufacturer would classify itself within the WeMakeIt parts code scheme. <categoryBag>Validating Taxonomies Because WeMakeIt Inc. wants their suppliers properly categorized, it would provide a validation mechanism for its taxonomy. WeMakeIt Inc. would set up a Web service to validate any UDDI entry that is categorized using its custom taxonomy. This Web service would conform to the validate_values requirements specified in the UDDI version 2.0 programmer's API. WeMakeIt Inc. would register this service with the UDDI Business Registry using the mechanism specified by the operator node that controls WeMakeIt Inc.'s entries. It would tell all of its suppliers to reference this validate_values Web service with their private portal UDDI registries. Without this effort WeMakeIt Inc.'s custom taxonomy would have remained unchecked. The difference between a checked and an unchecked taxonomy is fairly important. With a checked taxonomy, any save_business, save_service, or save_tModel that references this taxonomy will use the validate_values service published by WeMakeIt Inc. If an entry specifies an invalid category, or WeMakeIt Inc.'s validate_values service returns an error for some reason, the save operation for the entry fails. If WeMakeIt Inc. develops an unchecked taxonomy, there would be no way its suppliers could ensure that their categorizations accurately reflected WeMakeIt Inc.'s supplies coding scheme. |
About the author
Related Sites
|