Hi

Maybe its this what you are looking for
http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html

On Thu, Jul 24, 2014 at 2:21 PM, Frankiboy <mail.to.fra...@gmail.com> wrote:
> I have information in my  header, where i look in a property fil, to get the
> correct url.
>
> So in my  SetRoutingKey.class i have this line where i put the correct
> endpoint
>
>   requestHeaders.put(CentralRouter.ENDPOINT, Util.getEndpoint());
>
>
> but my  .to(header(ENDPOINT).convertToString().toString()) fails....
>
>
>
>   from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching()
>       .onException(Exception.class).process(new LogError()).end()
>       .bean(LogMq.class, "logStart")
>       .bean(AddIpBean.class)
>       .bean(SetRoutingKey.class).choice().when(header(ENDPOINT).isNotNull())
>       .to(header(ENDPOINT).convertToString().toString())
>       .otherwise().to("file:/fja/");
>
>
> Its this the right way to do it, or is there a better way to do this ?
>
> And if its the right way, what is the syntax for this line
> .to(header(ENDPOINT).convertToString().toString())
>
>
> Frank
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Only-one-but-difrent-endpoints-in-same-route-is-this-the-way-tp5754375.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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

Reply via email to