Hi See this FAQ http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
There is some limitations how far you can take a DSL in pure Java with generics. 2012/3/28 Magnus Palmér <magnus.palmer.w...@gmail.com>: > Hmm, can this be a bug perhaps? > > This works: > >> .marshal(new JaxbDataFormat("org.example.mypackage")) >> .when(header("foo").isEqualTo("bar")) >> > > This doesn't: (Compilation error: The method when(Predicate) is undefined > for the type ProcessorDefinition<ChoiceDefinition>) > >> .marshal().jaxb("org.example.mypackage") >> .when(header("foo").isEqualTo("bar")) >> > > Using Camel 2.10-SNAPSHOT. -- Claus Ibsen ----------------- CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/