Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5.0, 1.6.0, 2.0-M1, 1.6.1, 2.0-M2, 2.0-M3, 2.0.0
-
None
Description
If the we want to clean up the attachment in the pipeline processor, we will hit this bug.
from("direct:start") .process(new Processor() { public void process(Exchange exchange) throws Exception { exchange.getOut().copyFrom(exchange.getIn()); //Added the header and attachment exchange.getOut().setHeader("test", "testValue"); exchange.getOut().addAttachment("test1.xml", new DataHandler(new FileDataSource("pom.xml"))); } }) .process(new Processor() { public void process(Exchange exchange) throws Exception { exchange.getOut().copyFrom(exchange.getIn()); assertNotNull("The test attachment should not be null", exchange.getOut().getAttachment("test1.xml")); assertNotNull("The test header should not be null", exchange.getOut().getHeader("test")); exchange.getOut().removeAttachment("test1.xml"); exchange.getOut().removeHeader("test"); } });
Attachments
Issue Links
- is depended upon by
-
SMXCOMP-626 servicemix camel component should support copy the camel message back to NormalizedMessage
- Resolved