camel-users mailing list archives

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


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"/>
</setHeader>
<routingSlip>
  <header>decisionSlip</header>
</routingSlip>

Hope that helps.

Jakub




--
View this message in context: http://camel.465427.n5.nabble.com/Is-there-a-tools-to-convert-java-dsl-to-xml-tp5768015p5768023.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message