Search code examples
javaweb-servicesjax-wswebsphere-8

Disable chunked transfer-encoding for JAX-WS Client in WebSphere Application Server 8.5


In a web application that runs on top of IBM WebSphere Application Server (WAS) V8.5.5.11, there is a JAX-WS client piece (using WAS built-in JAX-WS component) that calls an external web service.

For any web service call with an HTTP body larger than 32 KB, WAS will use chunked transfer-encoding. Unfortunately, the external web service cannot handle chunked transfer encoding, and will error out.

How do I disable chunked transfer-encoding within WAS JAX-WS client code?


Solution

  • I couldn't find a way to programmatically disable chunked transfer encoding for the built-in JAX-WS of WAS 8.5.5.x. But I did find a way to disable it through WAS "Administrative Console".

    Basically, you need to make a copy of "WSHTTPS default" policy set, and modify the "HTTP transport" policy to uncheck the box for "Enable chunked transfer encoding". Then assign this custom policy set to your service client.

    Detailed instructions can be found at https://www.ibm.com/support/knowledgecenter/en/SSEQTP_8.5.5/com.ibm.websphere.nd.doc/ae/twbs_wsspspthttp.html