davsclaus commented on code in PR #27377:
URL: https://github.com/apache/camel/pull/27377#discussion_r4184463460


##########
components/camel-spring-parent/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilter.java:
##########
@@ -27,16 +28,50 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.attachment.AttachmentMessage;
 import org.apache.camel.component.spring.ws.SpringWebserviceConstants;
+import 
org.apache.camel.component.spring.ws.SpringWebserviceHeaderFilterStrategy;
 import org.apache.camel.component.spring.ws.filter.MessageFilter;
+import org.apache.camel.spi.HeaderFilterStrategy;
 import org.springframework.ws.WebServiceMessage;
 import org.springframework.ws.soap.SoapHeader;
 import org.springframework.ws.soap.SoapMessage;
 
 /**
  * This class populates a SOAP header and attachments in the WebServiceMessage 
instance.
+ * <p>
+ * A message header is written into the SOAP header only when the {@link 
HeaderFilterStrategy} does not filter it, so by
+ * default the internal {@code Camel} and {@code camel} header namespace is 
not written.
  */
 public class BasicMessageFilter implements MessageFilter {
 
+    private final Supplier<HeaderFilterStrategy> headerFilterStrategy;
+
+    /**
+     * Creates a filter that applies a {@link 
SpringWebserviceHeaderFilterStrategy} to the message headers it writes
+     * into the SOAP header.
+     */
+    public BasicMessageFilter() {

Review Comment:
   Minor: a global/local `messageFilter` bean that extends `BasicMessageFilter` 
and calls `super()` (like the test's `GlobalMessageFilter`) gets a fixed 
`SpringWebserviceHeaderFilterStrategy`, not the endpoint's 
`headerFilterStrategy`. So a user who sets a pass-through strategy on the 
endpoint *and* uses a custom filter still has `Camel*` filtered. The upgrade 
guide covers this ("created in application code..."), so it's fine, but a line 
in the component doc's "custom header and attachment filtering" section could 
save someone a debugging session.



-- 
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]

Reply via email to