I am trying to consume a web service (SOAP API) but when the function is called, I get this exception:
The content type multipart/related; type="application/xop+xml"; boundary="uuid:53c58624-2aef-492e-83df-1129be39d10d"; start="
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID:
--uuid:53c58624-2aef-492e-83df-1129be39d10d
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <[email protected]>
Content-Disposition: attachment;name="130_1624559145'.
I'm using .NET Core 3.1 and used this Medium Article to set up my WSDL files/Connected Services. I have tried adding the following to my App.config file (though I'm not sure if I have it actually attached, it still has the green + sign). But it didn't seem to work.
I have also tried:
BasicHttpBinding binding = new BasicHttpBinding();
binding.MessageEncoding = WSMessageEncoding.Mtom;
But it doesn't seem to work because .MessageEncoding does not seem to be supported in .NET Core 3.1 and only in .NET Framework. So, does anyone know of a fix to the exception or to allow the binding to be encoded as Mtom?
Sachin SinghPosted Jun 27, 2021, 1:53 PM