Camel editor change my route.xml
gcollin Mar 6, 2015 9:03 AMI'm using Eclipse Luna with JBoss Developer Studio (Core Features) 8.0.2.GA-v20150114-2029-B382 and JBoss Fuse Tooling Apache Camel Editor 7.3.0.v20141209-1819-H340-Beta2
It appears when I open some Camel route.xml files, the file is transformed, and the route is then changed.
For example, I edit a route.xml file like this:
<?xml version="1.0" encoding="ASCII"?>
<!-- to uri="log:src.com.agcs.bih?showAll=true" / --><routes xmlns="http://camel.apache.org/schema/spring">
<route id="SrcOutTranslatorRoute">
<from uri="switchyard://TranslateMessageService"/>
<!-- Exception flow -->
<onException>
<exception>org.apache.camel.ValidationException</exception>
<exception>javax.xml.transform.TransformerException</exception>
<handled>
<constant>true</constant>
</handled>
<log message="Error ${exception.class.simpleName}" loggingLevel="ERROR" logName="Bih.SrcDestFlow"/>
<process ref="BihExceptionHandler"/>
<to uri="jms:queue:Src.in?connectionFactory=%23ConnectionFactory&transacted=true"/>
</onException>
<!-- Normal flow -->
<to uri="validator:xml/SrcOutMessage.xsd?useDom=true"/>
<to uri="xslt:xml/SrcToIdm.xslt"/>
<to uri="jms:queue:Src.Idm.out?connectionFactory=%23ConnectionFactory&transacted=true"/>
</route>
</routes>
I save it, and reopen it in the Fuse tooling routes editor. It then gets transformed to this:
<?xml version="1.0" encoding="ASCII"?>
<!-- to uri="log:src.com.agcs.bih?showAll=true" / --><!-- Exception flow --><!-- Normal flow --><routes xmlns="http://camel.apache.org/schema/spring">
<route id="SrcOutTranslatorRoute">
<from uri="switchyard://TranslateMessageService"/>
<onException>
<exception>org.apache.camel.ValidationException</exception>
<exception>javax.xml.transform.TransformerException</exception>
<handled>
<constant>true</constant>
</handled>
<log message="Error ${exception.class.simpleName}" loggingLevel="ERROR" logName="Bih.SrcDestFlow"/>
<process ref="BihExceptionHandler"/>
<to uri="jms:queue:Src.in?connectionFactory=%23ConnectionFactory&transacted=true"/>
<to uri="validator:xml/SrcOutMessage.xsd?useDom=true"/>
<to uri="xslt:xml/SrcToIdm.xslt"/>
<to uri="jms:queue:Src.Idm.out?connectionFactory=%23ConnectionFactory&transacted=true"/>
</onException>
</route>
</routes>
Notice how suddenly the code after the onException has been integrated into onException ?