camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkorab <>
Subject Re: Is there a tools to convert java dsl to xml ?
Date Tue, 09 Jun 2015 14:50:50 GMT

cloud wrote
> Is there a tools to convert java dsl to xml ?   

No, although you can see an XML representation of a route defined in any DSL
(Java, XML, Groovy, Scala etc.) by calling a method called dumpRouteAsXml()
when looking at it though JMX. 

cloud wrote
> Is every java dsl code  have a equal xml counterpart?
> When I am reading the camel document's , there are many snippets code that
> writen by java dsl .
> As a new user , sometimes I have to use xml instead of java dsl  .

Yes it does. A good reference (shameless self-promotion) is the Apache Camel
Developer's Cookbook - it contains examples of every DSL element in both the
Java and XML DSLs.

cloud wrote
> In fact , I want to know how could I convert the below code to xml 
> from("direct:start")
>   .setHeader("decisionSlip").method(OrderProcessorBean.class,
> "calculateRoute")
>   .routingSlip("decisionSlip");

<from uri="direct:start">
<setHeader name="decisionSlip">
  <method ref="myOrderProcessorBean" method="calculateRoute"/>

Hope that helps.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message