wse

How do I mix message encoding types (Text/MTOM) in the Request & Response of a Web Service client application using WCF (or WSE 3)?

扶醉桌前 提交于 2019-12-02 19:28:50
Here is my problem. I am hitting a web service (hosted on a Java based server) that will only accept text encoded Requests, but it returns MTOM Responses. What I've found is that if I set the web service to RequireMtom, it sends an Mtom request! Unfortunately, the server chokes on an Mtom request and returns a 500 error. However, if I set it to Text message encoding, the response comes back correctly with a multipart MIME (MTOM) response that errors out the Microsoft Web Service API (sample error below). It's expecting a text encoded response because the request was text encoded. I would like