oscerd opened a new pull request, #27377: URL: https://github.com/apache/camel/pull/27377
## Description [CAMEL-25340](https://issues.apache.org/jira/browse/CAMEL-25340) The `headerFilterStrategy` added to camel-spring-ws by CAMEL-23759 is configured to filter the `Camel*` header namespace in both directions, and the 4.21 upgrade guide describes it that way. Only the inbound direction was applied: by the consumer (CAMEL-23759), and by the producer for SOAP response headers (CAMEL-25225). The default `messageFilter`, `BasicMessageFilter`, wrote every String message header as a SOAP header attribute. That applies to the request sent by the producer and to the response returned by the consumer, and it included names in the `Camel*` namespace. ## Changes - `BasicMessageFilter` applies a `HeaderFilterStrategy` (`applyFilterToCamelHeaders`) before writing a message header into the SOAP header. This covers both String values written as attributes and QName values written as elements. - A new constructor takes a `Supplier<HeaderFilterStrategy>`. A `null` strategy disables filtering. - The no-arg constructor applies a `SpringWebserviceHeaderFilterStrategy`. - `getHeaderFilterStrategy()` is protected, so subclasses can override it. - `SpringWebserviceComponent` binds its fallback `BasicMessageFilter` to the endpoint's configured `headerFilterStrategy`, so a custom strategy on the endpoint is honoured. The `MessageFilter` interface is unchanged. Global and custom message filters keep their own behaviour. - The `headerFilterStrategy` option description now mentions the outbound direction. The component JSON, catalog and endpoint DSL are regenerated. - Tests: - `BasicMessageFilterTest` gains four cases: the producer and consumer don't write `Camel*` names (including case variants and a QName element); a supplied strategy is applied; a `null` strategy writes every header. - New `OutboundSoapHeaderFilterTest` covers the component wiring end to end: the consumer response and the producer request with the default configuration, and a pass-through `headerFilterStrategy` on the endpoint. - Upgrade guide notes in 4_23, in 4_22 (4.22.1 to 4.22.2) and in 4_18 (4.18.4 to 4.18.5). Each sits next to the CAMEL-25225 note, since the change is meant to be backported to `camel-4.22.x` and `camel-4.18.x` once merged. ## Testing - `mvn clean install` in `components/camel-spring-parent/camel-spring-ws`: 103 tests, 0 failures. - The two new "not written" integration tests fail against the previous `BasicMessageFilter` and pass with this change. - Full reactor build from the root: `mvn clean install -DskipTests`. _Claude Code on behalf of oscerd_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
