Andrea Cosentino created CAMEL-25340:
----------------------------------------

             Summary: camel-spring-ws: apply the HeaderFilterStrategy to 
outbound SOAP headers
                 Key: CAMEL-25340
                 URL: https://issues.apache.org/jira/browse/CAMEL-25340
             Project: Camel
          Issue Type: Improvement
          Components: camel-spring-ws
            Reporter: Andrea Cosentino
            Assignee: Andrea Cosentino
             Fix For: 4.23.0


CAMEL-23759 added the {{headerFilterStrategy}} endpoint option to 
camel-spring-ws. Its default, {{SpringWebserviceHeaderFilterStrategy}}, is 
configured to filter the {{Camel*}} / {{camel*}} header namespace 
(case-insensitive) in both directions, and the 4.21 upgrade guide describes it 
that way. CAMEL-25225 applied it to the SOAP response headers mapped by the 
producer. The outbound direction is still never applied.

The default {{messageFilter}}, {{BasicMessageFilter}}, writes every String 
message header as a SOAP header attribute: on the request sent by the producer, 
and on the response returned by the consumer. Names in the {{Camel*}} namespace 
are written as well.

Proposed change:
* Have {{BasicMessageFilter}} consult the endpoint's {{headerFilterStrategy}} 
({{applyFilterToCamelHeaders}}) before writing a message header into the SOAP 
header, on both the producer request and the consumer response.
* Tests for both directions, including case variants of {{Camel*}} names, plus 
a regular application header that must still be written.
* Upgrade-guide notes (4.23, and the 4.22 / 4.18 entries on main), since 
{{Camel*}} headers will no longer be written into SOAP headers.

_Claude Code on behalf of oscerd_



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

Reply via email to