tESBConsumer fails when handling a response with content-encoding=[gzip]

Problem Description

Calling a web service with the tESBConsumer component fails at the response level with the following error:

Caused by: java.lang.RuntimeException: Couldn't parse stream.  at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1706) 
 at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:123) 
 at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) 
 at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798)  
 at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1670)
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(WstxInputFactory.java:550) 
 at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:605) 
 at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:628) 
 at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:331) 
 at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1704) 
 ... 19 more

 

Root Cause

The response is sent from the web service in the GZIP format.

 

Solution

Prior to Talend 6.4.x, the tESBConsumer component couldn't handle that format.

 

In Talend 6.5.1, you can avoid this issue by selecting the Use GZip Compression check box in the Basic settings view of the tESBConsumer component.

gzip.jpg

 

Note: GZIP support has been implemented in the tESBConsumer but not in the tSOAP component because tSOAP is not CXF based. Talend recommends using the tESBConsumer component instead of the tSOAP component.

Version history
Revision #:
5 of 5
Last update:
‎08-13-2019 09:14 AM
Updated by: