Just to follow-up.. I seem to have gotten this to work with the following in
my processing bean:
public void process(Exchange exchange) throws Exception {
log.debug("Entered TransformFeature process() method...");
InputStream is = exchange.getIn().getBody(java.io.InputStream.class);
// TODO I get a wierd encoding "UTF-8" not supported WARNING in the
// karaf console, could potentially change encoding appropriately here
to workaround?
XMLStreamReader reader = StaxUtils.createXMLStreamReader(is);
// closing underlying input stream because it wasn't getting closed
// when coming from a file component
is.close();
if ((reader != null) && (inElementsMap != null || inAppendMap != null
|| inDropElements != null)) {
log.debug("Creating InTransformReader...");
reader = new InTransformReader(reader, inElementsMap,
inAppendMap,
inDropElements, null, blockOriginalReader);
}
// possilbly could have used Identity transform here to
transform the STAX
source to Stream result string
Document d = StaxUtils.read(reader);
exchange.getIn().setBody(d, org.w3c.dom.Document.class);
}
--
View this message in context:
http://cxf.547215.n5.nabble.com/cxf-transformation-feature-could-code-be-ported-and-used-in-Camel-tp5746812p5747047.html
Sent from the cxf-user mailing list archive at Nabble.com.