
556
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Chapter 32Description Namespace
32
The System.Web.Services.
Description Namespace
The System.Web.Services.Description namespace includes types used to represent the
elements of Web Service Description Language (WSDL), an XML grammar that
describes web services and specifies how to interact with them. Web services
created with ASP.NET automatically generate their own WSDL documents,
which contain all the information a client needs to interact with them and
invoke their methods. You can retrieve this document by requesting the appro-
priate .asmx file with ?WSDL appended to the end of the URL (as in http://www.
mysite.com/myservice.asmx?WSDL).
The starting point for understanding this namespace is the ServiceDescription class,
which represents the complete WSDL document and provides collections of
Binding, Message, Types, and Service objects. The ServiceDescription class also provides Read( )
and Write( ) methods, which allow you to convert between actual WSDL docu-
ments and their object representation. Finally, you can also use the
ServiceDescriptionReflector class to create a ServiceDescription object based on an existing
web service by supplying the web service’s URL.
Another interesting class in this namespace is ServiceDescriptionImporter, which
provides the functionality .NET uses ...