You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by anakin59490 <je...@voila.fr> on 2013/12/02 12:08:57 UTC

Re: set property before starting

Hi,

It doesn't work by using properties file, this is what i tried :

In my route,

fromF("ftp://{{user.name}}:%s@xxxxxx//echange/MassPayment/IN/?noop=false&initialDelay=0&idempotent=true&stepwise=false",
decryptedPwd)     -->  OK, it works !

but if i use my properties file :

fromF("{{source.endpoint.1}}", decryptedPwd) in my route,  with from my
properties file,
source.endpoint.1=ftp://${user.name}:%s@xxxxxx//echange/MassPayment/IN/?noop=false&initialDelay=0&idempotent=true&stepwise=false 
it doesn't work,

it's as if %s is just text, not the decryptedPwd value

I try with :

source.endpoint.1=ftp://${user.name}:{{%s}}@xxxxxx//echange/MassPayment/IN/?noop=false&initialDelay=0&idempotent=true&stepwise=false

or 

source.endpoint.1=ftp://${user.name}:$simple{%s}@xxxxxx//echange/MassPayment/IN/?noop=false&initialDelay=0&idempotent=true&stepwise=false


but it doesn't work


Thank's for your help




--
View this message in context: http://camel.465427.n5.nabble.com/set-property-before-starting-tp5744088p5744177.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: set property before starting

Posted by Claus Ibsen <cl...@gmail.com>.
Yes %s is a replacer in the String.format method. See the javadoc of
how that works.

Its expected to not be possible to use in a .properties file. You
still need to use fromF("url", password) and pass in the decryped
password as the 2nd parameter.

fromF is using String.format under the covers.


On Mon, Dec 2, 2013 at 12:08 PM, anakin59490 <je...@voila.fr> wrote:
> Hi,
>
> It doesn't work by using properties file, this is what i tried :
>
> In my route,
>
> fromF("ftp://{{user.name}}:%s@xxxxxx//echange/MassPayment/IN/?noop=false&initialDelay=0&idempotent=true&stepwise=false",
> decryptedPwd)     -->  OK, it works !
>
> but if i use my properties file :
>
> fromF("{{source.endpoint.1}}", decryptedPwd) in my route,  with from my
> properties file,
> source.endpoint.1=ftp://${user.name}:%s@xxxxxx//echange/MassPayment/IN/?noop=false&initialDelay=0&idempotent=true&stepwise=false
> it doesn't work,
>
> it's as if %s is just text, not the decryptedPwd value
>
> I try with :
>
> source.endpoint.1=ftp://${user.name}:{{%s}}@xxxxxx//echange/MassPayment/IN/?noop=false&initialDelay=0&idempotent=true&stepwise=false
>
> or
>
> source.endpoint.1=ftp://${user.name}:$simple{%s}@xxxxxx//echange/MassPayment/IN/?noop=false&initialDelay=0&idempotent=true&stepwise=false
>
>
> but it doesn't work
>
>
> Thank's for your help
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/set-property-before-starting-tp5744088p5744177.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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