[ 
https://issues.apache.org/jira/browse/CAMEL-25225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18121599#comment-18121599
 ] 

Claus Ibsen commented on CAMEL-25225:
-------------------------------------

Merged to main via https://github.com/apache/camel/pull/27211. Backports to 
camel-4.18.x and camel-4.22.x labelled (port/*).

> camel-spring-ws: apply the HeaderFilterStrategy to producer response headers
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-25225
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25225
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-spring-ws
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 4.18.5, 4.22.2, 4.23.0
>
>
> CAMEL-23759 added the {{headerFilterStrategy}} endpoint option to 
> camel-spring-ws. Its default, {{SpringWebserviceHeaderFilterStrategy}}, 
> filters the {{Camel*}} / {{camel*}} header namespace (case-insensitive), and 
> {{SpringWebserviceConsumer}} applies it when it maps inbound SOAP header 
> attributes and elements to Exchange headers.
> The producer does not apply it. When {{allowResponseHeaderOverride=true}}, 
> {{SpringWebserviceProducer.populateMessageHeaderFromResponse}} copies every 
> SOAP response header attribute and element into the message headers by local 
> name, so header names in the {{Camel*}} namespace are copied as well.
> Proposed change:
> * Consult the endpoint's {{headerFilterStrategy}} 
> ({{applyFilterToExternalHeaders}}) for both the attribute loop and the 
> element loop in {{populateMessageHeaderFromResponse}}, as the consumer does.
> * Add tests for the producer response path with 
> {{allowResponseHeaderOverride=true}}: attributes, elements and case variants 
> of {{Camel*}} names, plus a regular application header that must still be 
> mapped.
> * Mention in the {{allowResponseHeaderOverride}} option description that 
> response header names go through the {{headerFilterStrategy}}.
> * Add an upgrade-guide note (4.23, and the 4.22 / 4.18 entries on main), 
> since {{Camel*}} header names from the SOAP response will no longer be copied.
> _Claude Code on behalf of oscerd_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to