0

I'm trying to implement Gzip compression in a WCF Service that is hosted on IIS.

Previously the binding config was set as --

<customBinding> <binding name="SOAPBinding"> <textMessageEncoding messageVersion="Soap11WSAddressing10" /> </binding> </customBinding> 

Now to implement compression, I'm changing the binding config to --

<customBinding> <binding name="SOAPBinding"> <binaryMessageEncoding compressionFormat="GZip" /> </binding> </customBinding> 

Once I make the changes, whenever I'm trying to get the response for the endpoint (testing using SOAP UI), it returning error response as

Cannot process the message because the content type 'application/soap+xml;charset=UTF-8 was not the expected type 'application/soap+msbin1+gzip'.

With the previous binding config, the service is working fine. Once I'm changing the custom Binding it is throwing the error.

Expectation is when the Accept-Encoding : gzip, is sent in the request the service should return the response with header Content-Encoding : gzip, once the compression is enabled

3
  • First of all, I suggest you change the version of soap to Soap 1.1. Then I think this post can help you solve the problem.How do you send a ZIP file in the request body in SoapUI / ReadyAPI Commented Oct 30, 2023 at 9:19
  • How to set the soap version to 1.1 within custom binding ? Commented Oct 30, 2023 at 11:25
  • Under Web.Config **<binding> ** there is one ** <textMessageEncoding>**that can be used to specify the Soap version. You can see this document for details<textMessageEncoding> Commented Oct 31, 2023 at 5:19

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.