Seven Stars

CXF with gzip


In a Talend route, how can we use gzip compression during the CXF soap request/response ?

I tried adding "Accept-Enconding" header to true in my camel Route before the CXF component and adding "zip" module in the advanced parameters of a MessagingEndpoint, but I always get this error, even with a very simple message body that contains only 1 letter, read from a true UTF-8 file.


java.lang.RuntimeException: Couldn't parse stream.
	at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(
	at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
	at org.apache.cxf.endpoint.ClientImpl.onMessage(
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$
	at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$ Source)
	at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$
	at Source)
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(
	at com.ctc.wstx.stax.WstxInputFactory.createSR(
	at com.ctc.wstx.stax.WstxInputFactory.createSR(
	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(
	at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(
	... 10 more
Caused by: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(
	... 14 more


What's the way to use Soap compression in Talend ESB ?