Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part III: Namespace Reference > The System.Web.Services.ConfigurationNamespace

Chapter 29. The System.Web.Services.ConfigurationNamespace

The System.Web.Services.Configuration namespace contains three .NET attributes that are useful if you want to add custom format extensions to your web services (in other words, if you want to insert additional XML elements to your web service's WSDL service description). One practical reason to use a format extension is if your web service requires a SOAP extension that runs at both the server and the client end. By default, no information about SOAP extensions is added to the service description, meaning that clients may not be aware that they need to use a given extension (for example, a security or encryption extension) before they can use the web service.

To use a format extension in this way, you need to start by deriving a custom class from System.Web.Services.Description.ServiceDescriptionFormatExtension, which represents the actual format extension. Next, you use the XmlFormatExtensionAttribute in this namespace with the class to define the extension points where the extension should apply. Optionally, you can use the XmlFormatExtensionPointAttribute class with the custom format extension class to specify a member in the class that will act as a new extension point, and the XmlFormatExtensionPrefixAttribute to set an XML namespace for the elements generated by the format extension. Finally, you configure your format extension to run within the <serviceDescriptionFormatExtensionTypes> section of the configuration file. Figure 29-1 shows the types in this namespace.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint