2 Replies Latest reply on Dec 23, 2015 4:54 PM by lhein

    Camel editor change my route.xml

    gcollin

      I'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&amp;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&amp;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&amp;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&amp;transacted=true"/>

          </onException>

        </route>

      </routes>

       

      Notice how suddenly the code after the onException has been integrated into onException ?