2 Replies Latest reply on Dec 16, 2008 8:48 AM by Anderson Nielson

    How to convert a SQL result in a XML document ?

    Jorge Klemm Newbie

      How to convert a SQL result in a XML document with Camel ?

       

      I don't found any conversor to solve my problem.

       

      Simple Code Example:

       

      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 = #")

      .TRANSFORM_RESULT_LIST_TO_XML()

      .to("direct:sendXML");

       

      Thanks.