You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2023/05/05 16:57:00 UTC
[jira] [Updated] (CAMEL-19324) Be able to convert all elements from CXF MessageContentsList.class to String.class if not in "CXF Context"
[ https://issues.apache.org/jira/browse/CAMEL-19324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-19324:
--------------------------------
Issue Type: Improvement (was: Bug)
> Be able to convert all elements from CXF MessageContentsList.class to String.class if not in "CXF Context"
> ----------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-19324
> URL: https://issues.apache.org/jira/browse/CAMEL-19324
> Project: Camel
> Issue Type: Improvement
> Components: came-cxf
> Reporter: Freeman Yue Fang
> Assignee: Freeman Yue Fang
> Priority: Major
>
> Having
> {code}
> MessageContentsList list = new MessageContentsList();
> list.add("haha");
> list.add("hehe");
> {code}
> {code}
> from("timer:tick")
> .process(new Processor() {
> @Override
> public void process(Exchange exchange) throws Exception {
> exchange.getIn().setBody(list);
> }
> })
> .log("my body ${body}");
> {code}
> It prints "my body haha" but i would expect "my body [haha, hehe]" (as with ArrayList).
> If MessageContentsList is used in "CXF context", the first element is return value, the other elements are Holders, so it has special logic in converter. But if use MessageContentsList in non - "CXF context", it should be treated as a general ArrayList, which can honour behaviour when converting to String.class is needed(like in to.("log...") processor)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)