June 01, 2002
Modeling XML ApplicationsYou don't need to be an XML or SOAP expert to use the universal description, discovery and integration specification to find and publish interfaces and contextual information about Web services. Part 4 of 4.David Carlson
The Universal Description, Discovery and Integration (UDDI) specification has received much attention as one of the enabling technologies required for Web services. However, few people understand its capabilities beyond the fact that it's used to store and retrieve Web service definitions. A UML model of the UDDI content and message structures provides a quick introduction to their scope of use, without requiring any understanding of other specifications such as XML Schema or SOAP.
The Universal Description, Discovery and Integration (UDDI) specification has received much attention as one of the enabling technologies required for Web services. However, few people understand its capabilities beyond the fact that it's used to store and retrieve Web service definitions. A UML model of the UDDI content and message structures provides a quick introduction to their scope of use, without requiring any understanding of other specifications such as XML Schema or SOAP. The UML model described in this article was produced with an automated reverse-engineering procedure based on the same principles described in the first three articles in this series. In particular, I'll focus on creating a platform-independent model that hides the XML Schema syntax and terminology used in the UDDI specification. These details are retained, however, within the UML profile meta-data contained in the model.
UDDI Data Structure Model It's also likely that these same capabilities of UDDI will be used to describe Web services deployed within the private boundary of a single business. A lone firm like General Motors or IBM is larger than many extended business collaborations and faces a similar challenge of heterogeneous system integration using Web services. The UDDI specification documents (see www.uddi.org) describe the data structures of UDDI content and the SOAP messages used to interact with a repository. However, I'll concentrate on the XML Schema document that defines all content and messages for UDDI 2.0.
The "Initial UDDI Schema Model" (at right) graphic depicts a small
subset of the UML class diagram reverse-engineered from the UDDI 2.0 schema.
Each
The reverse-engineering algorithm can map schema structures into conceptual
modeling structures in UML that would be recognized as good object-oriented
design. Also, many modelers strive for concise, uncluttered diagrams. The UDDI
schema contains several element type definitions like this one for
<xsd:element name =
"businessServices">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref =
"businessService"
minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
This defines an XML element that serves as a container for businessService
elements. The initial class diagram represents this structure directly. However,
it's better represented as an association end-role in UML. The reverse-engineering
algorithm will be enhanced to recognize this pattern, but at this point, I manually
modified the diagram after importing this model into Rational Rose.
discoveryURL,
phone, email and so on), but they represent simple
data structures with one or two primitive attributes, and each type extends
the XML Schema built-in datatype for string content. For a more concise view
in the diagram, these types are represented as UML attributes, but could also
be shown as associations (for example, from contact to email).
Even if you don't know the XML Schema language, this diagram can serve as a
map to encourage understanding of the range of possible structures contained
in UDDI. A businessService describes a service that's offered by
one businessEntity and is classified using a categoryBag
containing one or more taxonomy keys. Standard categories include industry type,
product or service type, and geography.
A set of bindingTemplates describes how and where to access this
Web service. The access method is a choice of either an accessPoint
(for example, a URL) or a hostingRedirector (an indirect reference
to another bindingTemplate).
Next, you must define how to use this Web service. A set of tModelInstanceInfo
objects contains reference to specifications that provide technical details
about the service. The tModelKey attribute points to a tModel
object instance, which in turn references an overviewDoc object
that contains a specification URL.
A tModel service type definition is used to describe compliance
with a specification, a concept or a shared design. Web Services Definition
Language (WSDL) is the dominant approach used to describe current Web services.
The overviewDoc URL points to a document containing a WSDL service
interface definitiona separate XML document defined by its own schema. A complex
business-service definition in UDDI refers to several tModels.
One of these might be a process flow definition that describes the orchestration
of several Web service calls required to fulfill the overall service goal.
UDDI Message ModelThese UDDI data structures are only half the story. The UDDI interface is itself described as a set of Web services used to publish and discover services contained in the repository. The single UDDI schema contains a long list of service messages that use the core data structures as their content. And, because these messages are each defined in an XML Schema document, we can apply the same reverse-engineering approach to create a UML model of the message structures.
find_business and save_business. The former message is used
to search for a business by various criteria. The latter message is used when
creating a new business entry or updating an existing entry. When saving a business
description, the message content is contained in a businessEntity object as
defined in the core data structures model. As appropriate, businessServices
and bindingTemplates may be included in this entity. A corresponding XML message
instance appears as follows:
<save_business generic="2.0" xmlns="urn:uddi-org:api_v2"> <authInfo><!- token -></authInfo> <businessEntity>...</businessEntity> </save_business>
As part of registering a business, a set of identifiers, categories or discovery
URLs is included. As seen in the "UDDI Messages" diagram, those same
identification objects form the basis for finding a specific business or a set
of businesses in a particular category. If the Although the UDDI messages are intended to be carried via the SOAP protocol, one of the benefits of abstracting these message definitions in a platform-independent UML model is the ability to discuss and debate the information content separate from its transport. These same messages and data structures could be carried via other, non-SOAP message middleware or even via distributed object facilities such as CORBAalternative platform-specific deployment architectures for service description and discovery.
XML Vocabularies and Web Services The UDDI model describes a vocabulary for the Web services infrastructure, but the same reverse-engineering techniques may also be applied to application domains such as finance, order management and health care. Indeed, I have reverse-engineered UML models from schemas for the XML Common Business Library (xCBL), the Financial Products Markup Language (FpML) and many other specialized and company-specific schemas. An interesting tension exists between object-oriented design practices and the service-oriented designs that are the foundation of Web services integration. Many of the first-generation Web services simply create request-response messages based on the operations of existing Java or C++ objectsthe operation's parameters become the request message content and the operation's result value is wrapped in an XML response message. However, this often yields a large number of fine-grained messages that may not perform well in distributed systems.
A scalable service interface is similar to the EJB session bean
concept, in which the session interface has a more coarsely grained structure
and the details of low-level operations are hidden within its implementation.
One operation for The design challenge is also reversed when many Web services interfaces are defined as a long list of independent messages. This is the case with UDDI: The supplementary documentation classifies and explains the message types, but only in human-readable format. The next steps of my journey into model-based Web services will focus on using session-oriented interfaces to define related service messages; for example, by creating a BusinessEntityManager interface that collects operations for finding, saving and deleting business entities in UDDI. In spite of the rush to implement them, Web services specifications are still in their formative stagesand best practices for their design are difficult to find. However, I hope that I've convinced you of modeling's value as one of the techniques that will help guide this exciting evolution.
|
|
|||||||||||||||||||||||||||||||
|
|
|
|