You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sprabu <sa...@gmail.com> on 2012/12/25 21:38:28 UTC

How map the SQL query values in to XML Payload?

Hi,
I'm fetching records from a DB and want to set those values in XML payload.
Whats the way in Spring XML DSL approach? Any idea.. Or Any other way or
approach is there???
Thanks in advance.



--
View this message in context: http://camel.465427.n5.nabble.com/How-map-the-SQL-query-values-in-to-XML-Payload-tp5724584.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How map the SQL query values in to XML Payload?

Posted by Christian Müller <ch...@gmail.com>.
You receive the database content as list/map. Than you can use a bean or
processor to transfom it to everything you need. E. g. to a JAXB bean and
than marshall [1] it to xml.
You don't have to use xslt.

[1] http://camel.apache.org/jaxb.html

Best,
Christian

On Mon, Jan 7, 2013 at 11:43 AM, sprabu <sa...@gmail.com> wrote:

> Is it possible to bring the DB values in to XSL ??? If so, can you please
> tell me how?
>
> Many Thanks in Advance.
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-map-the-SQL-query-values-in-to-XML-Payload-tp5724584p5725044.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Re: How map the SQL query values in to XML Payload?

Posted by sprabu <sa...@gmail.com>.
Is it possible to bring the DB values in to XSL ??? If so, can you please
tell me how?

Many Thanks in Advance.




--
View this message in context: http://camel.465427.n5.nabble.com/How-map-the-SQL-query-values-in-to-XML-Payload-tp5724584p5725044.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How map the SQL query values in to XML Payload?

Posted by sprabu <sa...@gmail.com>.
Hi,
Already i'm doing message transformation  by using xslt. I don't know how i
fetch the DB values and bring it to xsl transformation. Any way or idea... 





--
View this message in context: http://camel.465427.n5.nabble.com/How-map-the-SQL-query-values-in-to-XML-Payload-tp5724584p5725043.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How map the SQL query values in to XML Payload?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can also look at using a template engine to build up a XML
document as a template and use tokens where the DB values should be
inserted.

Such as velocity / freemarker
http://camel.apache.org/velocity

Or use XSLT (albeit can be hard to do correct)
http://camel.apache.org/xslt

On Tue, Dec 25, 2012 at 9:38 PM, sprabu <sa...@gmail.com> wrote:
> Hi,
> I'm fetching records from a DB and want to set those values in XML payload.
> Whats the way in Spring XML DSL approach? Any idea.. Or Any other way or
> approach is there???
> Thanks in advance.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-map-the-SQL-query-values-in-to-XML-Payload-tp5724584.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: How map the SQL query values in to XML Payload?

Posted by Łukasz Dywicki <lu...@code-house.org>.
You can use xstream data format to turn java object into XML data structure. It doesn't require any annotations to run.

Cheers,
Lukasz Dywicki
--
luke@code-house.org
Twitter: ldywicki
Blog: http://dywicki.pl
Code-House - http://code-house.org

Wiadomość napisana przez sprabu w dniu 25 gru 2012, o godz. 21:38:

> Hi,
> I'm fetching records from a DB and want to set those values in XML payload.
> Whats the way in Spring XML DSL approach? Any idea.. Or Any other way or
> approach is there???
> Thanks in advance.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-map-the-SQL-query-values-in-to-XML-Payload-tp5724584.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How map the SQL query values in to XML Payload?

Posted by Christian Müller <ch...@gmail.com>.
Or use JAXB, the standard for Java XML binding...

Best,
Christian

Sent from a mobile device
Am 26.12.2012 02:21 schrieb "sprabu" <sa...@gmail.com>:

> Hi,
> I'm fetching records from a DB and want to set those values in XML payload.
> Whats the way in Spring XML DSL approach? Any idea.. Or Any other way or
> approach is there???
> Thanks in advance.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-map-the-SQL-query-values-in-to-XML-Payload-tp5724584.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>