Thanks Mick. I need to keep this in Spring XML if possible. It just occurred to me that maybe it is writing to "in" instead of "out", but I don't know how to change that in the XML.
On Sep 1, 2011, at 9:37 AM, "BASE Logic, Inc. [via Camel]"<[email protected]> wrote: > I cant read the code you added, but I use the setHeader and setBody in java > > > .setHeader(Routes.FUNCTIONAL_AREA_HEADER).method(CallEventHeaderService.class, > > "getFunctionalArea") > > this way I use a bean to set the fields like: > > public String getFunctionalArea(CallEvent callEvent) { > return callEvent.getFunctionalArea().name(); > } > > > --- > Thank You… > > Mick Knutson, President > > BASE Logic, Inc. > Enterprise Architecture, Design, Mentoring & Agile Consulting > p. (855) BASE-LOGIC: (227-3564-42) > p. (478) BASE-LOGIC (227-3564-42) > f. (855) BASE-LOGIC: (227-3564-42) > > Website: http://www.baselogic.com > Blog: http://www.baselogic.com/blog/ > Linked IN: http://linkedin.com/in/mickknutson > Twitter: http://twitter.com/mickknutson > --- > > > > On Thu, Sep 1, 2011 at 11:27 AM, pkleczka <[hidden email]> wrote: > > > 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> > > > > > > <ReceiptList><Batch><JMSMessageID>${header.JMSCorrelationID}</JMSMessageID><Exception>${exception} > > > > - CAUSE-IS: > > > > ${exception.cause}</Exception><CamelRoute>EFileBatchBusinessRulesRequestCheck</CamelRoute><MessageBody><![CDATA[${in.body}]]></MessageBody><Result>Fail</Result></Batch></ReceiptList> > > > > </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. > > > > > If you reply to this email, your message will be added to the discussion > below: > http://camel.465427.n5.nabble.com/Change-message-body-after-exception-tp4758775p4758806.html > To unsubscribe from Change message body after exception, click here. -- View this message in context: http://camel.465427.n5.nabble.com/Change-message-body-after-exception-tp4758775p4758843.html Sent from the Camel - Users mailing list archive at Nabble.com.
