Enabling compression for incoming SOAP messages

Enabling compression for incoming SOAP messages

  
Hi,

We have a set of web services for data integration. The volumes for the incoming data is going to be very high, so we are looking for a solution that would allow us to compress the requests sent by the client initiating the messaging. I looked with Fiddler and noticed that by default the response to any client initiated request is compressed (unlike the requests) when I had created WCF client with Visual Studio.

I tried enabling compression with these instructions: http://stackoverflow.com/questions/10600278/wcf-compression-with-net-4

Now my binding configuration at the client is like this:
<customBinding>
  <binding name="BinaryCompressionBinding">
    <binaryMessageEncoding compressionFormat="GZip"/> 
    <httpTransport /> 
  </binding> 
</customBinding>
When checking with Fiddler, I see that the request sent by the client now is compressed. However, Outsystems now responds with an error message:

HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Security-Policy: frame-ancestors 'self'
Content-Type: application/soap+xml; charset=utf-8
Date: Mon, 01 Feb 2016 08:39:51 GMT
Server: Microsoft-IIS/8.5
X-Frame-Options: SAMEORIGIN
Content-Length: 533
Connection: keep-alive
 
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><soap:Code><soap:Value>soap:Receiver</soap:Value></soap:Code><soap:Reason><soap:Text xml:lang="en">Server was unable to process request. ---&gt; '&#x1F;', hexadecimal value 0x1F, is an invalid character. Line 1, position 1.</soap:Text></soap:Reason><soap:Detail /></soap:Fault></soap:Body></soap:Envelope>

Do you have any suggestions on how to enable compression for incoming requests to Outsystems?

When trying with Visual Studio test project, I sent the following request:

POST https://test/Utilytics/TimeSeriesData.asmx HTTP/1.1
Content-Type: application/soap+msbin1+gzip
Host: test.utilytics.com
Content-Length: 477
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
       
(binary content)

Received the following response:

HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Security-Policy: frame-ancestors 'self'
Content-Type: application/soap+xml; charset=utf-8
Date: Mon, 01 Feb 2016 10:15:35 GMT
Server: Microsoft-IIS/8.5
X-Frame-Options: SAMEORIGIN
Content-Length: 533
Connection: keep-alive
 
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><soap:Code><soap:Value>soap:Receiver</soap:Value></soap:Code><soap:Reason><soap:Text xml:lang="en">Server was unable to process request. ---&gt; '&#x1F;', hexadecimal value 0x1F, is an invalid character. Line 1, position 1.</soap:Text></soap:Reason><soap:Detail /></soap:Fault></soap:Body></soap:Envelope>

When trying with SOAP UI, I sent the following request:

POST https://test/Utilytics/TimeSeriesData.asmx HTTP/1.1
Content-Encoding: gzip
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "http://Utilytics/TimeSeriesData/GetTimeSeriesData"
Content-Length: 339
Host: test.utilytics.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
 
(binary content)

Received the following response:

HTTP/1.1 400 Bad Request
Cache-Control: private
Content-Security-Policy: frame-ancestors 'self'
Content-Type: text/html
Date: Mon, 01 Feb 2016 10:13:25 GMT
Server: Microsoft-IIS/8.5
X-Frame-Options: SAMEORIGIN
transfer-encoding: chunked
Connection: keep-alive
 
Bad Request

I also tried by creating a REST interface. Still it seems that the request does not get uncompressed before it arrives to the web service action.

Request:

PUT https://dev/rest//TimeSeriesData/SaveTimeSeriesData? HTTP/1.1
Content-Type: application/json; charset=utf-8
Content-Encoding: gzip
Host: dev.utilytics.com
Content-Length: 327
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

Response:

HTTP/1.1 400 Bad Request
Cache-Control: no-cache
Content-Security-Policy: frame-ancestors 'self'
Content-Type: application/json; charset=utf-8
Date: Mon, 01 Feb 2016 13:12:57 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-IIS/8.5
X-Frame-Options: SAMEORIGIN
Content-Length: 144
Connection: keep-alive
 
{"Errors":["Failed to parse 'auxinParamData': Unable to translate bytes [8B] at index 1 from specified code page to Unicode."],"StatusCode":400}