Re: converting XML DSL example to Java

2017-06-12 Thread Claus Ibsen
Hi Or inline the expressions as a parameter argument transform( ) transform(simple("Hi ")) Then you don't need any kind of endChoice etc. On Mon, Jun 12, 2017 at 11:07 AM, Alessandro Rontani wrote: > I think you can use .endChoice() to end a branch, so you can try this: > > public

Re: converting XML DSL example to Java

2017-06-12 Thread Alessandro Rontani
I think you can use .endChoice() to end a branch, so you can try this: public void configure() { from("servlet:hello") .choice() .when(header("name")) .transform().simple("Hi ${header.name}") .endChoice() .otherwise() .transform().constant("no name") .endChoice()

converting XML DSL example to Java

2017-06-11 Thread Ralph Cook
The camel example for using Spring and XML DSL routing has the following config file: http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:camel="http://camel.apache.org/schema/spring"; xsi:schemaLoc