You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by cgfulton <cg...@gmail.com> on 2013/01/15 21:59:45 UTC

Re: How to get header/property info out from sendBodyAndHeader/sendBodyAndProperty

How do I configure the camel context to get the string value from
header/property? In my case I would like to use the exec component and pass
option values using the header/property. 



	<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
		<route>
			<from uri="direct:ping" />
			 <to uri="exec:ping?args=-c1 ${in.header.host}"/> 
		</route>
		<route>
		<from uri="direct:echo" />
			 <to uri="exec:ls?args=-c1 ${in.header.dir}"/> 
		</route>
	</camelContext>



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-get-header-property-info-out-from-sendBodyAndHeader-sendBodyAndProperty-tp3272364p5725591.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to get header/property info out from sendBodyAndHeader/sendBodyAndProperty

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Jan 15, 2013 at 9:59 PM, cgfulton <cg...@gmail.com> wrote:
> How do I configure the camel context to get the string value from
> header/property? In my case I would like to use the exec component and pass
> option values using the header/property.
>

See this FAQ
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html


>
>
>         <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>                 <route>
>                         <from uri="direct:ping" />
>                          <to uri="exec:ping?args=-c1 ${in.header.host}"/>
>                 </route>
>                 <route>
>                 <from uri="direct:echo" />
>                          <to uri="exec:ls?args=-c1 ${in.header.dir}"/>
>                 </route>
>         </camelContext>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-get-header-property-info-out-from-sendBodyAndHeader-sendBodyAndProperty-tp3272364p5725591.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