Q

Using DIME to send attachments to a Web service

I want to use DIME to send attachments to a Web Service. When I add a Web Reference to the WSDL in a .NET client application, the proxy generated does not provide DIME support. How do I enable this support for WSE?

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.

This was first published in December 2004

Dig deeper on Microsoft .NET Web services

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide

SearchWinDevelopment

Close