MS WS Basics
MS WS Basics
Page Options
XML Web Services Basics
Roger Wolter
Microsoft Corporation
December 2001
Contents
What Is an XML Web Service?
SOAP
WSDL
UDDI
What's Left?
I'll cover all three of these technologies in this article but first I want
to explain why you should care about XML Web services.
In the future, some of the most interesting XML Web services will
support applications that use the Web to do things that can't be done
today. For example, one of the services that XML Web Services would
make possible is a calendar service. If your dentist and mechanic
exposed their calendars through this XML Web service, you could
schedule appointments with them on line or they could schedule
appointments for cleaning and routine maintenance directly in your
calendar if you like. With a little imagination, you can envision
hundreds of applications that can be built once you have the ability to
program the Web.
For more information on XML Web services and the applications they
will help you build, please see the MSDN XML Web Services Developer
Center.
SOAP
Soap is the communications protocol for XML Web services. When
SOAP is described as a communications protocol, most people think of
DCOM or CORBA and start asking things like, "How does SOAP do
object activation?" or "What naming service does SOAP use?" While a
SOAP implementation will probably include these things, the SOAP
standard doesn't specify them. SOAP is a specification that defines the
XML format for messages—and that's about it for the required parts of
the spec. If you have a well-formed XML fragment enclosed in a couple
of SOAP elements, you have a SOAP message. Simple isn't it?
There are other parts of the SOAP specification that describe how to
represent program data as XML and how to use SOAP to do Remote
Procedure Calls. These optional parts of the specification are used to
implement RPC-style applications where a SOAP message containing a
callable function, and the parameters to pass to the function, is sent
from the client, and the server returns a message with the results of
the executed function. Most current implementations of SOAP support
RPC applications because programmers who are used to doing COM or
CORBA applications understand the RPC style. SOAP also supports
document style applications where the SOAP message is just a
wrapper around an XML document. Document-style SOAP applications
are very flexible and many new XML Web services take advantage of
this flexibility to build services that would be difficult to implement
using RPC.
The last optional part of the SOAP specification defines what an HTTP
message that contains a SOAP message looks like. This HTTP binding
is important because HTTP is supported by almost all current OS's
(and many not-so-current OS's). The HTTP binding is optional, but
almost all SOAP implementations support it because it's the only
standardized protocol for SOAP. For this reason, there's a common
misconception that SOAP requires HTTP. Some implementations
support MSMQ, MQ Series, SMTP, or TCP/IP transports, but almost all
current XML Web services use HTTP because it is ubiquitous. Since
HTTP is a core protocol of the Web, most organizations have a network
infrastructure that supports HTTP and people who understand how to
manage it already. The security, monitoring, and load-balancing
infrastructure for HTTP are readily available today.
The ubiquity of HTTP and the simplicity of SOAP make them an ideal
basis for implementing XML Web services that can be called from
almost any environment. For more information on SOAP, see the
MSDN SOAP home page.
WSDL
WSDL (often pronounced whiz-dull) stands for Web Services
Description Language. For our purposes, we can say that a WSDL file
is an XML document that describes a set of SOAP messages and how
the messages are exchanged. In other words, WSDL is to SOAP what
IDL is to CORBA or COM. Since WSDL is XML, it is readable and
editable but in most cases, it is generated and consumed by software.
To see the value of WSDL, imagine you want to start calling a SOAP
method provided by one of your business partners. You could ask him
for some sample SOAP messages and write your application to
produce and consume messages that look like the samples, but this
can be error-prone. For example, you might see a customer ID of
2837 and assume it's an integer when in fact it's a string. WSDL
specifies what a request message must contain and what the response
message will look like in unambiguous notation.
Many current SOAP toolkits include tools to generate WSDL files from
existing program interfaces, but there are few tools for writing WSDL
directly, and tool support for WSDL isn't as complete as it should be.
It shouldn't be long before tools to author WSDL files, and then
generate proxies and stubs much like COM IDL tools, will be part of
most SOAP implementations. At that point, WSDL will become the
preferred way to author SOAP interfaces for XML Web services.
UDDI
Universal Discovery Description and Integration is the yellow pages of
Web services. As with traditional yellow pages, you can search for a
company that offers the services you need, read about the service
offered and contact someone for more information. You can, of course,
offer a Web service without registering it in UDDI, just as you can
open a business in your basement and rely on word-of-mouth
advertising but if you want to reach a significant market, you need
UDDI so your customers can find you.
A UDDI directory entry is an XML file that describes a business and the
services it offers. There are three parts to an entry in the UDDI
directory. The "white pages" describe the company offering the
service: name, address, contacts, etc. The "yellow pages" include
industrial categories based on standard taxonomies such as the North
American Industry Classification System and the Standard Industrial
Classification. The "green pages" describe the interface to the service
in enough detail for someone to write an application to use the Web
service. The way services are defined is through a UDDI document
called a Type Model or tModel. In many cases, the tModel contains a
WSDL file that describes a SOAP interface to an XML Web service, but
the tModel is flexible enough to describe almost any kind of service.
The UDDI directory also includes several ways to search for the
services you need to build your applications. For example, you can
search for providers of a service in a specified geographic location or
for business of a specified type. The UDDI directory will then supply
information, contacts, links, and technical data to allow you to
evaluate which services meet your requirements.
UDDI allows you to find businesses you might want to obtain Web
services from. What if you already know whom you want to do
business with but you don't know what services are offered? The
WS-Inspection specification allows you to browse through a collection
of XML Web services offered on a specific server to find which ones
might meet your needs.
What's Left?
So far we've talked about how to talk to XML Web services (SOAP),
how XML Web services are described (WSDL) and how to find XML
Web services (UDDI). These constitute a set of baseline specifications
that provide the foundation for application integration and
aggregation. From these baseline specifications, companies are
building real solutions and getting real value from them.
While much work has been done to make XML Web services a reality,
more is needed. Today, people are having success with XML Web
services, but there are still things that are left as an exercise for the
developer®e.g. security, operational management, transactions,
reliable messaging. The Global XML Web Services Architecture will
help take XML Web services to the next level by providing a coherent,
general purpose model for adding new advanced capabilities to XML
Web services which is modular and extensible.
Average rating:
How would you rate the quality of this content?
6 out of 9
1 2 3 4 5 6 7 8 9
Poor Outstanding
1 2 3 4 5 6 7 8 9
Tell us why you rated the content this way. (optional)
1851 people have rated this
page
Submit