You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ODarwish <ot...@progressoft.com> on 2013/03/06 16:35:52 UTC

Using routing slip as work around to parameterize the end point URI


Since most of  end point components does not accept expression or place
holder ,and those paramters  evaluated  at runtime, I used this workaround : 

<route>
<from uri=”direct:start”/>
.
.

<setHeader headerName="ftpEndPoint">
<simple>ftp://${property.IPAddress}/${property.parentFolder}/${property.subFolder}?username=${property.ftpUserName}&amp;password=${property.ftpUserPass}&amp;fileName=${date:now:yyyyMMddHHmmss}_${{property.FileName}</simple>
</setHeader>
<routingSlip>
<header>ftpEndPoint</camel:header>
</routingSlip>
</route>

its work fine, is there any cleaner option ?






-----
Othman Darwish
ProgressSoft Corp.

--
View this message in context: http://camel.465427.n5.nabble.com/Using-routing-slip-as-work-around-to-parameterize-the-end-point-URI-tp5728690.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Using routing slip as work around to parameterize the end point URI

Posted by ODarwish <ot...@progressoft.com>.
Thanks Claus  , Yes the recipient list is more cleaner and ill use it 



-----
Othman Darwish
ProgressSoft Corp.

--
View this message in context: http://camel.465427.n5.nabble.com/Using-routing-slip-as-work-around-to-parameterize-the-end-point-URI-tp5728690p5728743.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Using routing slip as work around to parameterize the end point URI

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Mar 6, 2013 at 4:46 PM, ODarwish <ot...@progressoft.com> wrote:
> recipient List or routing Slip will give the same result if we looking to
> solve the daynamic URI issue  ....right Claus ?
>

Yes, though with recipient list you do not need to set a header first.


>
>
>
>
> -----
> Othman Darwish
> ProgressSoft Corp.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Using-routing-slip-as-work-around-to-parameterize-the-end-point-URI-tp5728690p5728693.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: Using routing slip as work around to parameterize the end point URI

Posted by ODarwish <ot...@progressoft.com>.
recipient List or routing Slip will give the same result if we looking to
solve the daynamic URI issue  ....right Claus ?





-----
Othman Darwish
ProgressSoft Corp.

--
View this message in context: http://camel.465427.n5.nabble.com/Using-routing-slip-as-work-around-to-parameterize-the-end-point-URI-tp5728690p5728693.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Using routing slip as work around to parameterize the end point URI

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Mar 6, 2013 at 4:35 PM, ODarwish <ot...@progressoft.com> wrote:
>
>
> Since most of  end point components does not accept expression or place
> holder ,and those paramters  evaluated  at runtime, I used this workaround :
>
> <route>
> <from uri=”direct:start”/>
> .
> .
>
> <setHeader headerName="ftpEndPoint">
> <simple>ftp://${property.IPAddress}/${property.parentFolder}/${property.subFolder}?username=${property.ftpUserName}&amp;password=${property.ftpUserPass}&amp;fileName=${date:now:yyyyMMddHHmmss}_${{property.FileName}</simple>
> </setHeader>
> <routingSlip>
> <header>ftpEndPoint</camel:header>
> </routingSlip>
> </route>
>
> its work fine, is there any cleaner option ?
>

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

>
>
>
>
>
> -----
> Othman Darwish
> ProgressSoft Corp.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Using-routing-slip-as-work-around-to-parameterize-the-end-point-URI-tp5728690.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