Error converting cxf payload response to String

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Error converting cxf payload response to String

Hi there

(Latest) Talend ESB 6.4.1 with Karaf 4.1.1

We have a route that sends soap request to a WS with :
 + "dataFormat=PAYLOAD"
 + "&wsdlURL=${in.header.....}"
 + "&serviceName=${in.header....}"
 + "&endpointName=..."
 + "&username=..."
 + "&password=..."
 + "&headerFilterStrategy=#CXF_PAYLOAD_HEADER_FILTER"    

The WS call works fine, but we can't get its response as String. If we put
"String response = exchange.getIn().getBody(String.class)"
in a processor its fails with error :
"javax.xml.transform.TransformerException: Can't transform a Source of type

We've tried many workarounds :
- use a ConvertTo(String.Class) before the .process
- use java library org.apache.camel.component.cxf.CxfPayload
- use java library javax.xml.transform.stax.StAXSource

in each case we get a Transformer/cast exception.

Strangely, all these work in Talend console but not in Karaf.


Sent from: