camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pontus Ullgren <>
Subject Re: camel sql component
Date Tue, 20 May 2014 21:20:38 GMT
Hello Poyan,

You could try something like this to assign a header the value of the
body and then use the header name.
<camelContext id="camel" xmlns="">
      <from uri="direct:start"/>
      <setHeader headerName="theId">
      <setHeader headerName="theMessage">
      <to uri="sql:insert into messages (id, message) VALUES (:#theId,
      <to uri="mock:result" />

Hope this helps
// Pontus

On Tue, May 20, 2014 at 10:11 PM, Poyan G <> wrote:
> Hello,
> I have an route there I want to insert complete message in an row in the
> database, the problem is that the insert statement want # header name or
> body name, and to have body name my body need to be hashmap, my body is
> just an String and I want to insert the complete string in to database.
> What is the best way to to this ? I do not use Java for my route it's plain
> spring camel xml configuration.
> Thanks
> --
> Poyan Gerami

View raw message