| Sign In/My Account | View Cart |
Understanding UDDI and JAXR
Pages: 1, 2
| Taxonomy | tModelName |
|---|---|
| NAICS | ntis-gov:naics:1997 |
| ISO 3166 | iso-ch:3166:1999 |
| UNSPSC | unspsc-org:unspsc:3-1 |
| Other Taxonomy | uddi-org:general_keywords |
Obviously, you need to get the unique keys of these tModels to reference them in your category bags.
The best source for understanding identity and category bags is the "UDDI data structures" document (PDF) from UDDI.org.
So far we have seen how a business entity can make use of category bags using tModels. In addition, UDDI allows tModels themselves to be categorized. Why?
Let's draw a parallel to a hierarchical file system. Directories are used to categorize files, but directories can also be categorized under parent directories. Just like directories on a hard drive, tModels can be hierarchically organized.
Let's talk about a service called getUniversalTime(), which will return the current universal time anywhere in the world. Two competing companies might provide implementations of this service. A business service is tied to a company and not visible outside of that company. So you will end up with the following:
company1:getTime()
company1:getCurrentTime()
Both of these do the same. To indicate that they both implement a concrete conceptual service called getUniversalTime(), you can define a tModel as follows:
tModel
name: Get Universal Time
category: uddi-org:types, wsdl
[implying that this a service as
described by a WSDL document]
The above definition indicates that getUniversalTime() is a WSDL service that can be implemented by any organization.
Now that I have clarified the relationship between tModels and bags, I can show you the UML representation of a tModel.
|
From the diagram, you can see that a tModel is basically a name and description. In addition it can contain a URL for further details. A tModel can also be identified using an identity bag and categorized by a category bag.
While categorizing a tModel, we have learned that some of the categories to which a tModel can belong to are pre-defined by the UDDI -- WSDL, SOAP service, etc. Here is a list of some of these pre-defined categories in the uddi-org:types namespace.
tModelidentifier (Unique identifier)namespacecategorizationspecificationxmlSpecsoapSpecwsdlSpecprotocoltransportsignatureComponenttModel for your service. This requires a name for your service and one of the above types of service. Of course, you can always create your own categories if you don't particularly care for the above choices.tModel you have created above.Please refer to the excellent article by Andy Grove in the November, 2001 edition of Web Services Journal to see an example of this.
tModels are used for the following purposes in UDDI:
tModelstModel definitionsWhen you read literature about UDDI, it is very annoying to read terms that are fairly abstract. What the authors are trying to do is to draw parallels from the rest of the industry to the concepts in UDDI. However, it's very helpful to draw comparisons (however remote) to aid in our understanding of UDDI concepts.
A service binding is considered a case where interfaces are tied to their implementations; a binding element specifies a tModelInstaceInfo and an instanceDetail together. The tModelInstanceInfo points to a tModel that actually defines a service name. instanceDetail is expected to provide some specific detail about this service.
Again, an example will help. For the "Get Universal Time" service, the detail is expected to provide the actual WSDL document that defines inputs and outputs. In addition, the accesspoint of a binding is expected to give you a physical machine and a port where this service is implemented. With this background, one can conclude the following:
tModel defined for a service is the interface allowing multiple companies to provide multiple implementations.Namespaces appear all over the programming languages Java, C++, and XML. They may be called different things, but they all provide a context under which a name makes sense. In UDDI, a tModel represents "name." When you refer to this name as your category, you are essentially saying, "I belong to this name." In this sense, a tModel is representing a namespace.
When a service is registered as a tModel, one has the option of registering the protocol used to communicate with that service (such as WSDL, SOAP, etc.). Hence, a given tModel has a fingerprint of WSDL or a fingerprint of SOAP, depending on which specification it is using. Thus tModels are considered technical fingerprints, each adhering to a certain technical specification. If tModel can represent a "technical fingerprint," I could also argue that a tModel can also be said to represent a "protocol" as well.
Taxonomy is synonymous with (and equivalent to) categorization, classification, and namespaces. Taxonomy provides a context under which identifiers such as numbers and names make sense. For example, US tax and ISBN numbers only makes sense when you know that they are US tax numbers or ISBNs. This sort of classification is sometimes called taxonomy.
A listing of business entitites in the UDDI registry and the ability to search for companies based on their name.
These categorize business entities into their business categories and other sorts of applicable categories.
These add the ability to understand a service definition and its access requirements with the help of a series of documents. serviceBindings and tModels help this cause.
I cannot possibly leave you without providing a decent reference where you can find example XML documents for the UDDI, to help you solidify your understanding of UDDI.
tModels and Taxonomies." JAXR is a Java XML API for working with service registries. As we have discussed so far, all elements of a UDDI are described using XML documents. In a sense, if you are able to send an XML message containing a service definition, the UDDI registry should be able to register it or update it, as the case may be. Let us see how one can accomplish this if you don't have any tools:
If you have access to JAXM, you can do a better job of the same interaction. Because JAXM allows you to send XML messages without concern for SOAP headers and is strictly a message-oriented protocol, using this approach, the above sequence becomes:
Here comes JAXR to the rescue. Here, you only need to work with a high-level Java API that will internally generate all of the necessary messages and transact them through JAXM. The interesting point to note is that JAXM will be used to accomplish the task.
Let's look at the stated goals for JAXR:. (This list is directly taken from (JSR 93.)
JAXR is expected to support not only UDDI, but other similar registry standards (such as ebXML) as well.
"Understanding UDDI tModels and Taxonomies" by Andy Grove, Web Services Journal, November 2001.
If you have access to this magazine, this should be your first read to get an overall idea of UDDI and tModels. You can follow this up by reading the data model as documented in a PDF document at uddi.org. This reference is also a good source to get example XML for the UDDI.
UDDI Data Structure Specification (PDF)
This is the most comprehensive and valuable document for not only using UDDI, but understanding it. If you to read only one document on UDDI, read this one.
UML of the UDDI
Recently the DTD of an XML is being increasingly represented using UML. UML, being pictorial, can much more easily convey the structure of an XML document. With this trend,
this document
from XMLModelling.com can give you the minute details of UDDI, represented as XML. The only drawback might be that too much detail in a UML diagram could overwhelm the reader.
UDDI at Microsoft
One thing you can gain from the Microsoft Web site is the ability to understand the UDDI registry from the perspective of its GUI interface. For example, how can one register a service graphically, and how can one search for services on the Web?
This document explains the basic UDDI structures and their programmatic and online manipulation. For the GUI of a UDDI, refer to this document.
IBM'S UDDI Documents
This URL explains the relationship between WSDL and UDDI.
"Hangin' with the JAX Pack", a three-part series by Al
Saganich at OnJava.com.
This series is an excellent and lucid introduction to the JAXPACK API that includes JAXP, JAXB, JAXM, JAX-RPC, and JAXR.
Satya Komatineni is the CTO at Indent, Inc. and the author of Aspire, an open source web development RAD tool for J2EE/XML.
Return to ONJava.com.