[
https://issues.apache.org/jira/browse/CAMEL-21755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-21755.
---------------------------------
Resolution: Fixed
> Enrich with exchangepattern=InOut doesn't return enriched body.
> ---------------------------------------------------------------
>
> Key: CAMEL-21755
> URL: https://issues.apache.org/jira/browse/CAMEL-21755
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 4.10.0
> Reporter: Raymond
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.10.1, 4.11.0
>
> Attachments: main-xml-enrich.zip
>
>
> I have the following routes:
> {code:java}
> <routes id="camel" xmlns="http://camel.apache.org/schema/spring">
> <route id="1">
> <from uri="jetty:http://0.0.0.0:9001/test"/>
> <setExchangePattern pattern="InOut"/>
> <to uri="log:hello"/>
> <setBody>
> <constant>
> <example>
> <test>first</test>
> </example>
> </constant>
> </setBody>
> <enrich aggregationStrategy="attachmentEnrichStrategy">
> <simple>direct:enrich</simple>
> </enrich>
> <marshal>
> <mimeMultipart/>
> </marshal>
> <to uri="log:loggingmimemessage?showBody=true"/>
> </route>
> <route id="2">
> <from uri="direct:enrich"/>
> <setBody>
> <constant>
> <example>
> <test>second</test>
> </example>
> </constant>
> </setBody>
> </route>
> </routes>{code}
> I use this route with
> {color:#d5b778}<setExchangePattern
> {color}pattern{color:#6aab73}="InOut"{color}{color:#d5b778}/>{color}
> And
> {color:#d5b778}<setExchangePattern
> {color}pattern{color:#6aab73}="InOnly"{color}{color:#d5b778}/>{color}
> In Camel 4.9.0 both returns the following response:
> {code:java}
> ------=_Part_4_1957751777.1739867001483
> Content-Type: application/octet-stream
> Content-Transfer-Encoding:
> base64PGV4YW1wbGU+PHRlc3Q+Zmlyc3Q8L3Rlc3Q+PC9leGFtcGxlPg==
> ------=_Part_4_1957751777.1739867001483
> Content-Type: application/xml
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment;
> filename=3BA7C5718C8132C-0000000000000005PGV4YW1wbGU+PHRlc3Q+c2Vjb25kPC90ZXN0PjwvZXhhbXBsZT4=
> ------=_Part_4_1957751777.1739867001483-- {code}
> After upgrading to Camel 4.10.0 the InOnly still gives this response, but the
> InOut returns the orginal body. I attached a reproducer.
> {color:#d5b778}
> {color}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)