Hi

I am trying to enhance the message body after an exception. It does route to
the correct place, but the message is not altered. (The "simple" element
below actually contains entity codes for left and right angle brackets, but
shows up in this post as angle brackets).

       <route id="EFilEBatchRequestTransform">
            <from
uri="properties:{{queue.efilebatch.request.validatedtracsxsd}}" />
                            <to 
uri="properties:{{transformer.efilebatch.stripPrdKeyElement}}"/>
                        <to 
uri="properties:{{transformer.efilebatch.addCountNumber}}"/>
                        <to
uri="properties:{{transformer.efilebatch.changeOffenseCodeValue}}"/>
                        <to
uri="properties:{{transformer.efilebatch.changeLocationNodeIDValue}}"/>
                        <to 
uri="properties:{{transformer.efilebatch.codeTranslation}}"/>
                        <to
uri="properties:{{transformer.efilebatch.replaceSchemaLocation}}"/>
                        <to 
uri="properties:{{queue.efilebatch.request.transformed}}"/>
            
                             
                            <onException useOriginalMessage="false" >
                               
<exception>org.xml.sax.SAXParseException</exception>
                           
<exception>org.apache.camel.ValidationException</exception>
                               <exception>java.lang.RuntimeException</exception>
                           <handled><constant>true</constant></handled>

                                   <setBody>
                                     <simple>
                                        
&lt;ReceiptList&gt;&lt;Batch&gt;&lt;JMSMessageID&gt;${header.JMSCorrelationID}&lt;/JMSMessageID&gt;&lt;Exception&gt;${exception}
- CAUSE-IS:
${exception.cause}&lt;/Exception&gt;&lt;CamelRoute&gt;EFileBatchBusinessRulesRequestCheck&lt;/CamelRoute&gt;&lt;MessageBody&gt;&lt;![CDATA[${in.body}]]&gt;&lt;/MessageBody&gt;&lt;Result&gt;Fail&lt;/Result&gt;&lt;/Batch&gt;&lt;/ReceiptList&gt;
                                     </simple>
                                   </setBody>
                                    
                       <to
uri="properties:{{queue.efilebatch.request.rejected}}" /> 
                               <to 
uri="properties:{{queue.efilebatch.response}}" />
                                
                            </onException>

        </route>    

--
View this message in context: 
http://camel.465427.n5.nabble.com/Change-message-body-after-exception-tp4758775p4758775.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to