The request failed with HTTP status 415

寵の児 提交于 2019-12-11 06:41:46

问题


I am getting an exception when I try to call method from WCF...I am consuming WCF in windows application using framework 2.0 and my WCF uses the BasicHttpBinding option...

The request failed with HTTP status 415: Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'multipart/related; type="application/xop+xml"'


回答1:


The client application is failing as it sends data on an Endpoint which is expecting MTOM messages. However, the client application just sends plain Soap messages (Soap1.1). If you can't upgrade your client application to use .Net Framework 3.5, you can use WSE 3.0 which allows to use MTOM with .net framework 2.0.

If you can upgrade application to 3.5, you can use WCF to communicate to service.

Regards, Amit Bhatia



来源:https://stackoverflow.com/questions/5605457/the-request-failed-with-http-status-415

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!