Hi all,

I am trying to implements my routes in Camel XML (vs DSL).
Anyone can help me in converting the following DSL to XML ?

                /**
                 * Define the route from "A" where applications puts
                 * their HL7 messages.<br>
                 * First : the HL7 message is transformed to XML.<br>
                 * second : message is routed to both "B" and "C".
                 */
                from("activemq:A")
                        .process(new HL7toXML())
                .to("activemq:B", "activemq:C");

I have no problem with the from and to clauses, but I don't know how to
express the process clause in XML (the documentation is not verbose on the
subject :confused:).

HL7toXML is a class implementing the Processor interface like the following:

                public class HL7toXML implements Processor {
                                public void process(Exchange exchange) throws 
Exception {
                                String hl7Message = 
exchange.getIn().getBody(String.class);
                                String xmlMessage = 
HL7TransformerUtil.hl7ToXml(hl7Message);
                                exchange.getOut().setBody(xmlMessage, 
String.class);
                        }
                }

Thank in advance.

PJ.
-- 
View this message in context: 
http://www.nabble.com/how-to-do-that-in-camel-xml---tf4562649s22882.html#a13021883
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to