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.

Reply via email to