Cris Cris - 4 months ago 23
Java Question

HTTP SOAP payload Encoding

POST http://xxx/test HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: xxx:1041
Content-Length: 1911

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prop="http://...">
<soapenv:Header>
.....
</soapenv:Header>
<soapenv:Body>
.....
</soapenv:Body>
</soapenv:Envelope>


When i look via SOAP UI i see that Accept-Encoding is gzip,deflate.
This means the SOAP payload is zipped before is sent via http ? and on server side unzipped as part of the HTTP protocol ?

Thanks

Osw Osw
Answer

Accept-Encoding is a request header and in your particular case means, that party is just able to accept zipped content. In turn, response header Content-Encoding shows whether message was really gzipped.