Normally when you add a Web Reference, the generated proxy derives from System.Web.Services.Protocols.SoapHttpClientProtocol. This base class uses a strongly typed instance of the XML serializer to automagically serialize the parameters posted to a Web service endpoint, and deserialize the return value. The base class that supports emerging standards is from a different library, however. It is part of the WSE library: Microsoft.Web.Services.WebServicesClientProtocol (for WSE 1.0) or Microsoft.Web.Services2.WebServicesClientProtocol (for WSE 2.0).
If you add support for WSE to the client prior to adding a Web Reference, two proxies should be generated, one for non-WSE support (the former), another for WSE support. When you installed WSE (presumably 2.0) you should have installed development (IDE) support so that the plug-in to Visual Studio is installed. If you right-click the project in the Solution Explorer, you should see a menu item at the bottom of the context menu, for WSE settings. Select that, and from the first tab you can enable WSE support for the client application. This will add a reference to the WSE assembly that is installed to the Global Assembly Cache, and it will modify your app.config (or create one) to support the WSE configuration section.
Dig Deeper on Topics Archive
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.