Question

I'm trying to consume an old web service provided by a third party.
This WS uses DIME for attachments.

AFAIK in WCF is not possible for application/dime response content type to work, so I added a Framework 2.0 class library to my solution in order to use WSE obsolete web service client and proxy classes.

Can I build a client to consume a WS with DIME attachments? If so, how can I build an obsolete WSE 2.0 client in a recent Visual Studio environment?

Was it helpful?

Solution

I found a working solution to this problem, using WSE 3.0.
Using WSE it can be changed the default service proxy, as described here. Basically:

  • Add reference to Microsoft.Web.Services2.dll
  • Add service reference to the service with DIME attachments
  • Manually change the extended class in the auto-generated Reference.cs file to Microsoft.Web.Services2.WebServicesClientProtocol

This will give you access to the ResponseSoapContext member of the service client.
The ResponseSoapContext contains the Attachments member: it's a collection of the DIME attachments of the last executed web method.

OTHER TIPS

Web Service Enhancements 3 (WSE 3) is not officially supported since Visual Studio 2008. The reason is that Microsoft wants you to migrate your code to WCF. Check out the step-by-step blog link below with screenshots on how to enable WSE in Visual Studio. In theory, it should work in Visual Studio 2013.

Enable Web Services Enhancements (WSE) 3.0 in Visual Studio 2012, 2010 and 2008.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top