With the help of CxfPayLoadConverter, you can leverage the camel type convert with fewer codes like this String response = exchange.getOut().getBody(String.class);
-- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: willemjiang On Sunday, November 4, 2012 at 7:51 PM, Sachin wrote: > Strange, jut to let you know guys, it works with toString method of > org.apache.cxf.helpers.XMLUtils inspite of > org.apache.camel.converter.jaxp.XmlConverter. > > FYI: > > CxfPayload<SOAPHeader> resPayload = > exchange.getOut().getBody(CxfPayload.class); > List<Element> inElements = resPayload.getBody(); > String response =XMLUtils.toString(inElements.get(0)); > > gives you proper unmarshalled xml. Yet to find out the reasons though. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-CXF-strips-all-the-xml-elemets-and-attributes-and-send-only-data-with-whitespace-tp5721973p5722100.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).
