This content has been marked as final.
Show 2 replies
-
1. Re: How to convert a SQL result in a XML document ?
janstey Dec 15, 2008 3:20 PM (in response to jklemm)You can use the XStream component to achieve this.
from("direct:SQL_EXEC").process(new Processor() { public void process(Exchange exchange) throws Exception { List<String> params = new ArrayList<String>(); params.add("ABCDEFG"); exchange.getOut().setBody(params, List.class); } }).to("sql:SELECT * FROM SCHEMA.TABLE WHERE COLUMN = #"). marshal().xstream().to("direct:sendXML");
Just make sure that camel-xstream-*.jar is on the classpath.
Cheers,
Jon
-
2. Re: How to convert a SQL result in a XML document ?
anielson Dec 16, 2008 8:48 AM (in response to jklemm)You can use XBeans, Xstream or JAXB. See the documentation at: http://fusesource.com/docs/esb/4.0/fmr_nmr/FMRS.TMC.html#FMRS.MU