treefrog
treefrog

Reputation: 1057

Is there something that converts a java dsl to xml dsl in camel?

I am thinking it would be useful to be useful to the routes in java and have them be convertable to xml automatically. Even if it is not fully convertible at least some measure of it can be done.

Does it already exist in some form ?

Upvotes: 2

Views: 869

Answers (3)

Nahuel Fouilleul
Nahuel Fouilleul

Reputation: 19305

From AdviceWith source, there is

ExtendedCamelContext ecc = camelContext.adapt(ExtendedCamelContext.class);
...
ecc.getModelToXMLDumper().dumpModelAsXml(camelContext, definition);

Upvotes: 0

fakturk
fakturk

Reputation: 425

As Claus mentioned you can use hawtio for managing camel routes and you can see routes on their xml form, let me enrich his explanation with more pictures;

Here I wrote my routes on java dsl and can see their xml forms enter image description here

Or you can dump route as xml enter image description here

Upvotes: 0

Claus Ibsen
Claus Ibsen

Reputation: 55750

Yes try look at hawtio, which can output the routes in XML. And so can you as there is JMX API's or Java APIs when you run Camel, that can output the running routes in XML, regardless if you coded the routes in Java, Groovy, Scala, XML etc.

Upvotes: 5

Related Questions