use of org.apache.cxf.staxutils.DepthXMLStreamReader in project camel by apache.
the class DataInInterceptor method handleMessage.
public void handleMessage(Message message) throws Fault {
DepthXMLStreamReader xmlReader = getXMLStreamReader(message);
try {
// put the payload source as a document
Document doc = StaxUtils.read(xmlReader);
message.setContent(Source.class, new DOMSource(doc));
} catch (XMLStreamException e) {
throw new Fault(new org.apache.cxf.common.i18n.Message("XMLSTREAM_EXCEPTION", JUL_LOG), e);
}
}
Aggregations