Reputation: 891
There is a Java-Soap-Service which I want to call with WSE 3.0, I generated a Proxy with the WSDL-File but the service expects MTOM for it´s data. I also followed this tutorial and it worked well but didn´t helped: http://twit88.com/blog/2008/05/14/net-mtom-enabled-your-application-using-wse/
The Exception I get is:
System.FormatException: "WSE839: An HTTP response was received that used the following content type: text/xml;charset=UTF-8. The following content type was expected: multipart/related; type=application/xop+xml."
I know WSE 3.0 is obsolete if there is an other way to do it please tell.
Can some one please help?
Upvotes: 1
Views: 687
Reputation: 2896
Change your generated classes base class from System.Web.Services.Protocols.SoapHttpClientProtocol to Microsoft.Web.Services3.WebServicesClientProtocol. Once that is done you will be able to access a field called RequireMtom. Set this to true prior to calling any method that needs to send MTOM. Make sure to disable it for non MTOM calls.
Upvotes: 2