Chapter 3: Describing Web Services


Overview

In the last two chapters, we briefly went through the process of building and using Web services, and we looked at all the facets of SOAP messaging. We also discussed the SOAP interaction between the client and Web service. However, we still haven’t fully explored how the client knows what the interface to the Web service actually is. This is where Web Services Description Language (WSDL) comes in.

WSDL is an XML-based language that’s used to define Web services and describe the mechanisms that must be employed to access those Web services. One advantage of WSDL is that it was designed from the ground up to be extensible and, like SOAP, doesn’t force the use of a specific transmission protocol nor does it force the use of a specific type schema to describe the types used.

Although Microsoft .NET provides a framework for using Web services without having to understand WSDL, an understanding of WSDL lets you modify the autogenerated files and troubleshoot any problems that occur. Most of the time, you won’t need to look at the WSDL files you use, and .NET doesn’t generate the most elegant or readable WSDL description of a Web service anyway. However, it can sometimes be beneficial to modify the WSDL file that .NET generates. When we look at Universal Description, Discovery, and Integration (UDDI) in the next chapter, you’ll see that to fully use the Microsoft UDDI Business Registry you must manually write some of the WSDL.

Note

WSDL is specified in a W3C Note under the auspices of the Web Services Description Working Group at http://www.w3.org/2002/ ws/desc/, and the latest released version of the specification is always at http://www.w3.org/TR/wsdl. The current released version is version 1.1 and the next version, version 1.2, is currently a working draft. Because version 1.1 of the WSDL specification is the released version and the version that .NET implements, this chapter will concentrate on that version. The reader is directed to the Web Services Description Working Group Web site for details regarding later versions of the specification.

We’ll start by looking at WSDL in relation to a simple Web service. Once you have an understanding of WSDL, we can look at how .NET handles WSDL and some of the complexities that are added to what is a simple concept.




Programming Microsoft. NET XML Web Services
Programming MicrosoftВ® .NET XML Web Services (Pro-Developer)
ISBN: 0735619123
EAN: 2147483647
Year: 2005
Pages: 172

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net