Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

UDDI4J lets Java do the walking

Access any UDDI registry from within Java using the UDDI4J API

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Web services technology allows the communication between applications across the Internet over standard, XML-based protocols. The Simple Object Access Protocol (SOAP) invokes a Web service, which can be located anywhere on the Internet and written in any programming language. A Web service's interface is described using the Web Services Definition Language (WSDL). Public registries exist where a service provider can publish services and service requestors can find them. Such registries follow the Universal Description, Discovery, and Integration (UDDI) standard.

The standard defines an XML-based API with which clients access the registry. The open source UDDI4J project defines a Java API that provides access to any UDDI registry from within a Java application. UDDI4J lets you publish and find information in a UDDI registry by wrapping all the XML artifacts used by UDDI. It also handles the network access to a registry via the SOAP protocol, making it easy to integrate UDDI access into any new or existing Java application.

In this article, I introduce UDDI in general, then move on to the UDDI4J API, including some programming examples demonstrating its use. I will not cover the Web services architecture in any detail, nor will I explain the SOAP or WSDL specifications. Please see Resources for links to further articles and tutorials on these topics.

UDDI

UDDI defines a set of registries that contain information about businesses and the services they offer. Moreover, it defines a set of specifications: one specification for an XML schema that defines the structure of the contained data, one specification for a common API to access this data, and one API for the replication of data between different registries. A community of over 220 companies now back UDDI, each working together to define and support the comprising specifications.

Currently, two production UDDI registries exist: one hosted by IBM and one by Microsoft. Hewlett-Packard's registry should launch later this summer. (See Resources for links to all three registeries.) Since they replicate information between each other, any one provides all available information.

UDDI data structure

A UDDI registry contains data in a combination of white pages, yellow pages, and green pages. The white pages information includes items such as a business's name, its address, and other contact information. The yellow pages help categorize a business; they define its business type, as well as the industry in which it operates. Lastly, the green pages define what kinds of services a business offers, and how to electronically communicate with these services.

All UDDI registry data is formatted in XML. As such, the data structure specification defines the XML schemas all entries must follow. Some of the more generic defined elements can exist at various places of the registry:

  • TModel: A generic information container that typically points to a technical specification, thus making it possible to use TModels as technical fingerprints to identify certain services. Each TModel possesses a unique key. A number of entries in the UDDI registry use TModel, but most notably they are contained in a binding template, described below.
  • Identifier Bag: A number of named key-value pairs. Many of the elements in a UDDI registry can contain identifiers to help classify the given information. On top of that, each identifier includes a reference to a TModel, which indicates the key type contained in the identifier.
  • Category Bag: Contains a number of categories that resemble identifiers but have predefined taxonomies. For example, you'll find a category for industry codes as defined by the North American Industry Classification System (NAICS).


These elements help find businesses based on their industry classification, or based on certain technical specifications (TModels, for example) they support.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources