[ 
https://issues.apache.org/jira/browse/CAMEL-21755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Raymond updated CAMEL-21755:
----------------------------
    Description: 
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}

  was:
I have the following routes:

{color:#d5b778}<routes {color}id{color:#6aab73}="camel" 
{color}xmlns{color:#6aab73}="http://camel.apache.org/schema/spring"{color}{color:#d5b778}>{color}{color:#d5b778}
 <route 
{color}id{color:#6aab73}="1"{color}{color:#d5b778}>{color}{color:#d5b778} <from 
{color}uri{color:#6aab73}="jetty:[http://0.0.0.0:9001/test]"{color}{color:#d5b778}/>{color}{color:#d5b778}
 <setExchangePattern 
{color}pattern{color:#6aab73}="InOut"{color}{color:#d5b778}/>{color}{color:#d5b778}
 <to 
{color}uri{color:#6aab73}="log:hello"{color}{color:#d5b778}/>{color}{color:#d5b778}
 <setBody>{color}{color:#d5b778} 
<constant>{color}{color:#56a8f5}<{color}example{color:#56a8f5}><{color}test{color:#56a8f5}>{color}first{color:#56a8f5}<{color}/test{color:#56a8f5}><{color}/example{color:#56a8f5}>{color}{color:#d5b778}</constant>{color}{color:#d5b778}
 </setBody>{color}{color:#d5b778} <enrich 
{color}aggregationStrategy{color:#6aab73}="attachmentEnrichStrategy"{color}{color:#d5b778}>{color}{color:#d5b778}
 <simple>{color}direct:enrich{color:#d5b778}</simple>{color}{color:#d5b778} 
</enrich>{color}{color:#d5b778} 
<marshal><mimeMultipart/></marshal>{color}{color:#d5b778} <to 
{color}uri{color:#6aab73}="log:loggingmimemessage?showBody=true"{color}{color:#d5b778}/>{color}{color:#d5b778}
 </route>{color}{color:#d5b778} <route 
{color}id{color:#6aab73}="2"{color}{color:#d5b778}>{color}{color:#d5b778} <from 
{color}uri{color:#6aab73}="direct:enrich"{color}{color:#d5b778}/>{color}{color:#d5b778}
 <setBody>{color}{color:#d5b778} 
<constant>{color}{color:#56a8f5}<{color}example{color:#56a8f5}><{color}test{color:#56a8f5}>{color}second{color:#56a8f5}<{color}/test{color:#56a8f5}><{color}/example{color:#56a8f5}>{color}{color:#d5b778}</constant>{color}{color:#d5b778}
 </setBody>{color}{color:#d5b778} </route>{color}{color:#d5b778}</routes>{color}

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}


> 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
>            Priority: Minor
>         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)

Reply via email to