Sept. 4, 2010, 3:17 p.m.
posted by angryuser
The Web Services EnhancementsIn the second half of 2002, Microsoft released an add-on SDK for implementing GXA protocols with .NET Web services. This kit was called the Web Services Enhancements for Microsoft .NET (WSE). At its core, this technology uses WebRequest and SOAP extension interception points to enhance any SOAP request made over HTTP on the .NET platform. To use this kit on the client side, you need to reference the Microsoft.Web.Services.dll assembly in your project. Next, modify any proxy classes created with wsdl.exe (or Visual Studio .NET's Add Web Reference) to use the Microsoft.Web.Services.ClientProtocol base class, instead of the System.Web.Services.Protocols.SoapHttpClientProtocol base class. Now, you can add information, such as WS-Security information, to the request message via the additional RequestSoapContext property, and you can read the same information with the ResponseSoapContext property. Both of these properties are of type Microsoft.Web.Services. SoapContext. This class is read when messages are sent, and filled when they are sent. On the server side, you need to add a new HttpModule to web.config. Then, from within the ASP.NET Web service code, you can access the request and set the response SoapContext classes with the HttpSoap Context class:
<configuration>
<system.web>
<webServices>
<soapExtensionTypes>
<add type="Microsoft.Web.Services.WebServicesExtension,
Microsoft.Web.Services,
Version=1.0.0.0,
Culture=neutral,
PublicKeyToken=31bf3856ad364e35"
priority="1"
group="0"/>
</soapExtensionTypes>
</webServices>
</system.web>
</configuration>
Chapters 12 and 13 examine how you can use these properties within SoapContext to enhance your Web services for WS-Security, WS-Routing, and even DIME support. |
- Comment