Route details - whenever any message is sent to test.* queue, it is
intercepted and xslt transformation is done.
-------------------------------------------------------------------------------------------------------
<bean id="messageTransformer" class="com.test.MessageTransformer" />

<interceptSendToEndpoint uri="activemq:queue:test.*">
   <doTry>
      <process ref="messageTransformer" />                              
      <doCatch>                                 
         <exception>java.lang.RuntimeException</exception>
        <handled>
          <constant>true</constant>
        </handled>
        <setHeader headerName="Exception">
           <simple>${exception.message}</simple>
        </setHeader>
        <to uri="activemq:queue:SYSTEM.ERROR.MONITOR" />                        
                
     </doCatch>
   </doTry>
</interceptSendToEndpoint>

Bean details - this bean load an xml to find out which XSLT has to be
applied based on certain conditions and then applies the matching XSLT.
-----------------------------------------------------------------------------------------------------
private static void loadXmlConfig() throws Exception {
    XPath xpath;
    String xpathExpression;
    NodeList nodes;
    InputSource inputSource;

    // Load the transformer.xml
    xpath = XPathFactory.newInstance().newXPath();
    xpathExpression = "/Endpoint/transform";
    inputSource = new InputSource(<path to transformer.xml>);

   nodes = (NodeList) xpath.evaluate(xpathExpression,
inputSource,XPathConstants.NODESET); --->*Seems   this cast is generating
exception.*
   ...........
   ...........
}
   



--
View this message in context: 
http://camel.465427.n5.nabble.com/ClassCastException-in-XML-Parsing-JBoss-Fuse-ESB-6-0-tp5751062p5751103.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to