Hi Aki Yeah it should add those values as a List when if you add a 2nd value to the same key. We do the same in http based components
See the appendHeaders method on https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-http/src/main/java/org/apache/camel/component/http/helper/HttpHelper.java;h=e98f2bb75087cca8e4a02efcb61888c2804bfaa5;hb=HEAD We could consider having such a method in camel-core in a MessageHelper util class or something. On Wed, May 8, 2013 at 12:45 AM, Aki Yoshida <[email protected]> wrote: > We have a header entry that has multiple entries that are in the response > HTTP message. These multiple entries are available in CXF, as each header > value is represented as a list. However, when this message is propagated > back to camel, only the first entry of this list is read into the camel > message's headers. > > Looking at the current camel-cxf code in trunk as shown below, I don't see > an available option to propagate multiple entries back into the camel's > message header. > > // Copy the CXF protocol headers to the camel headers > Map<String, List<String>> cxfHeaders = > CastUtils.cast((Map<?, > ?>)message.get(Message.PROTOCOL_HEADERS)); > if (cxfHeaders != null) { > for (Map.Entry<String, List<String>> entry : > cxfHeaders.entrySet()) { > if (!strategy.applyFilterToExternalHeaders(entry.getKey(), > entry.getValue(), exchange)) { > headers.put(entry.getKey(), entry.getValue().get(0)); > } > } > } > > Is this assumption correct and if so, has there been some work on how to > get the multiple entries propagate back to camel? I can think of several > strategy/options to not to break the existing applications and I was > wondering if we can add such an option. > > I appreciate for your advice. > > regards, aki. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
