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.

Reply via email to