A
Web Services Primer
by
Venu Vasudevan
April 04, 2001
PAGE
2
SOAP
SOAP
is a protocol specification that defines a uniform way of passing
XML-encoded data. In also defines a way to perform remote procedure
calls (RPCs) using HTTP as the underlying communication protocol.
SOAP
arises from the realization that no matter how nifty the current
middleware offerings are, they need a WAN wrapper. Architecturally,
sending messages as plain XML has advantages in terms of ensuring
interoperability (and debugging, as I can well attest). The
middleware players seem willing to put up with the costs of
parsing and serializing XML in order to scale their approach
to wider networks.
Submitted
in 2000 to the W3C as a Note by IBM, Microsoft, UserLand, and
DevelopMentor, the further development of SOAP is now in the
care of the W3C's XML Protocols Working Group. This effectively
means that SOAP is frozen and stable until such time as the
W3C Working Group delivers a specification.
UDDI
(Universal Description, Discovery and Integration Service)
UDDI
provides a mechanism for clients to dynamically find other web
services. Using a UDDI interface, businesses can dynamically
connect to services provided by external business partners.
A UDDI registry is similar to a CORBA trader, or it can be thought
of as a DNS service for business applications. A UDDI registry
has two kinds of clients: businesses that want to publish a
service (and its usage interfaces), and clients who want to
obtain services of a certain kind and bind programmatically
to them. The table below is an overview of what UDDI provides.
UDDI is layered over SOAP and assumes that requests and responses
are UDDI objects sent around as SOAP messages. A sample query
is included below.
| Information |
Information
Operations |
Detailed
information (supported by lower-level API) |
| White
pages: Information such as the name, address, telephone
number, and other contact information of a given business |
Publish:
How the provider of a Web service registers itself. |
Business
information: Contained in a BusinessEntity object, which
in turn contains information about services, categories,
contacts, URLs, and other things necessary to interact with
a given business. |
| Yellow
pages: Information that categorizes businesses. This is
based on existing (non-electronic) standards |
Find:
How an application finds a particular Web service |
Service
information: Describes a group of Web services. These are
contained in a BusinessService object |
| Green
pages: Technical information about the Web services provided
by a given business. |
Bind:
How an application connects to, and interacts with, a Web
service after it's been found |
Binding
information: The technical details necessary to invoke a
Web service. This includes URLs, information about method
names, argument types, and so on. The BindingTemplate object
represents this data. |
| - |
- |
Service
Specification Detail: This is metadata about the various
specifications implemented by a given Web service. These
are called tModels in the UDDI specification |
There is no near-term plan in UDDI to support full-featured
discovery (e.g. geography-limited searches or bidding and contract
negotiation supported by vendors like eLance). UDDI expects
to be the basis for higher level services supported by some
other standard. There are plans for UDDI to support more complex
business logic, including support for hierarchical business
organizations. UDDI has fairly broad support; IBM, Ariba, and
Microsoft are driving it. It's not yet an open standard.
WSDL
(Web Services Definition Language)
WSDL
provides a way for service providers to describe the basic format
of web service requests over different protocols or encodings.
WSDL is used to describe what a web service can do, where it
resides, and how to invoke it. While the claim of SOAP/HTTP
independence is made in various specifications, WSDL makes the
most sense if it assumes SOAP/HTTP/MIME as the remote object
invocation mechanism. UDDI registries describe numerous aspects
of web services, including the binding details of the service.
WSDL fits into the subset of a UDDI service description.
WSDL
defines services as collections of network endpoints or ports.
In WSDL the abstract definition of endpoints and messages is
separated from their concrete network deployment or data format
bindings. This allows the reuse of abstract definitions of messages,
which are abstract descriptions of the data being exchanged,
and port types, which are abstract collections of operations.
The concrete protocol and data format specifications for a particular
port type constitute a reusable binding. A port is defined by
associating a network address with a reusable binding; a collection
of ports define a service. And, thus, a WSDL document uses the
following elements in the definition of network services:
Types
-- a container for data type definitions using some type system
(such as XSD)
Message
-- an abstract, typed definition of the data being communicated
Operation
-- an abstract description of an action supported by the service
Port
Type -- an abstract set of operations supported by one or more
endpoints
Binding
-- a concrete protocol and data format specification for a particular
port type
Port
-- a single endpoint defined as a combination of a binding and
a network address.
Service
-- a collection of related endpoints
So,
in plain English, WSDL is a template for how services should
be described and bound by clients.
XLANG
The
traditional notion of a database transaction is an atomic, that
is, all-or-none action; either the entire action happens or
it doesn't. Providing this kind of guarantee in a distributed
infrastructure involves an expensive process called two-phase
commit. An alternative optimistic model has been proposed in
database research (originally called sagas and proposed by Hector
Garcia-Molina), where actions have explicit compensatory actions
which negate the effect of the action. In the real world of
actions, the existence of compensatory actions is quite common.
For instance if I debit a credit card $52, the compensatory
action is to credit the credit card $52. If I sent out an e-mail
saying "you'll get the product you ordered in seven days",
the compensatory action is to send an e-mail saying, "oops,
it's going to take longer". XLang is a notation for expressing
the compensatory actions for any request that needs to be undone.
The web services infrastructure can leverage XLang specifications
to perform complex undo operations.