Ask the Expert

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?

    Requires Free Membership to View

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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: