This is an automated email from the ASF dual-hosted git repository.

oscerd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 7240570a0568 CAMEL-23526: camel-cxf - align Exchange header constant 
names with Camel naming convention (#23326)
7240570a0568 is described below

commit 7240570a05687792c95badfa8d11ed2644117230
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed May 20 10:30:53 2026 +0200

    CAMEL-23526: camel-cxf - align Exchange header constant names with Camel 
naming convention (#23326)
    
    * CAMEL-23526: camel-cxf - align Exchange header constant names with Camel 
naming convention
    
    Rename the Exchange header string values in CxfConstants (camel-cxf-common,
    shared by camel-cxf and camel-cxfrs) from operationName / operationNamespace
    to CamelCxfOperationName / CamelCxfOperationNamespace. The Java field names
    (OPERATION_NAME, OPERATION_NAMESPACE) are unchanged so routes and code that
    reference the constants symbolically continue to work without changes; 
routes
    that set the headers by their literal string value must be updated.
    
    Updates the single test that set the headers by literal value, the 
CxfProducer
    javadoc and the component documentation references, adds a 4.21 
upgrade-guide
    entry, and regenerates the component metadata, catalog, and endpoint DSL.
    
    Consistent with the same alignment applied in CAMEL-23508, CAMEL-23515 and
    CAMEL-23506.
    
    Reported by Claude Code on behalf of Andrea Cosentino
    
    Signed-off-by: Andrea Cosentino <[email protected]>
    
    * CAMEL-23526: camel-cxf - update cxfrs SimpleConsumer literal 
operationName usages after header constant rename
    
    The previous commit renamed the CxfConstants.OPERATION_NAME header value to
    CamelCxfOperationName. The cxfrs SimpleConsumer dispatch idiom routes on the
    operation by its literal header name, so the test/itest routes that used the
    old literal value were no longer matched and failed:
    
    - camel-cxf-rest and camel-cxf-spring-rest CxfRsConsumerSimpleBindingTest /
      CxfRsConsumerSimpleBindingImplTest: 
simple("direct:${header.operationName}")
      updated to simple("direct:${header.CamelCxfOperationName}").
    - camel-itest JettyRecipientListCxfIssueTest: literal "operationName" header
      updated to "CamelCxfOperationName".
    
    Also expands the camel-cxf 4.21 upgrade-guide entry with an explicit
    before/after for the documented cxfrs SimpleConsumer dispatch idiom, since 
the
    rename changes that public pattern for existing user routes.
    
    Reported by Claude Code on behalf of Andrea Cosentino
    
    Signed-off-by: Andrea Cosentino <[email protected]>
    
    * CAMEL-23526: camel-cxf - document cross-transport propagation pattern for 
the renamed operation header
    
    After the constant rename, CxfConstants.OPERATION_NAME = 
"CamelCxfOperationName"
    is filtered by transport HeaderFilterStrategy (JmsHeaderFilterStrategy,
    HttpHeaderFilterStrategy, etc.) at every transport boundary, by design — 
Camel*
    headers are framework-internal and are not propagated over the wire.
    
    For routes that bridge an external transport (JMS, HTTP, ...) into a cxf:
    producer and select the SOAP operation from a sender-supplied header, the
    documented pattern is to carry the operation in a non-Camel-prefixed
    application header and map it to CamelCxfOperationName in the route between
    the transport `from` and the cxf: `to`.
    
    - Adds the carrier-header mapping to the JmsToCxfInOutTest route context
      (between the JMS `from` and the cxf: `to`) and aligns the test code to 
send
      the operation through the carrier header instead of 
CxfConstants.OPERATION_NAME.
    - Aligns JettyRecipientListCxfIssueTest with the same carrier-header
      convention for the cross-HTTP path.
    - Expands the 4.21 upgrade-guide entry with an explicit before/after example
      for the cross-transport bridge pattern, applicable to JMS, HTTP-based
      transports, and any other transport whose default HeaderFilterStrategy
      filters Camel*.
    
    Reported by Claude Code on behalf of Andrea Cosentino
    
    Signed-off-by: Andrea Cosentino <[email protected]>
    
    ---------
    
    Signed-off-by: Andrea Cosentino <[email protected]>
---
 .../org/apache/camel/catalog/components/cxf.json   |  4 +-
 .../org/apache/camel/catalog/components/cxfrs.json |  2 +-
 .../component/cxf/common/message/CxfConstants.java |  4 +-
 .../apache/camel/component/cxf/jaxrs/cxfrs.json    |  2 +-
 .../src/main/docs/cxfrs-component.adoc             |  2 +-
 .../CxfRsConsumerSimpleBindingImplTest.java        |  2 +-
 .../CxfRsConsumerSimpleBindingTest.java            |  2 +-
 .../org/apache/camel/component/cxf/jaxws/cxf.json  |  4 +-
 .../src/main/docs/cxf-component.adoc               |  2 +-
 .../camel/component/cxf/jaxws/CxfProducer.java     |  2 +-
 .../CxfRsConsumerSimpleBindingImplTest.java        |  2 +-
 .../CxfRsConsumerSimpleBindingTest.java            |  2 +-
 .../cxf/CxfPayloadProviderRouterTest.java          |  6 +-
 .../ROOT/pages/camel-4x-upgrade-guide-4_21.adoc    | 74 ++++++++++++++++++++++
 .../endpoint/dsl/CxfEndpointBuilderFactory.java    | 12 ++--
 .../endpoint/dsl/CxfRsEndpointBuilderFactory.java  |  6 +-
 .../greeter/JettyRecipientListCxfIssueTest.java    |  3 +
 .../camel/itest/greeter/JmsToCxfInOutTest.java     |  9 ++-
 .../itest/greeter/JmsToCxfInOutTest-context.xml    |  8 +++
 19 files changed, 119 insertions(+), 29 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxf.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxf.json
index 85aaa628f061..59ab53bd4b67 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxf.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxf.json
@@ -34,8 +34,8 @@
     "useGlobalSslContextParameters": { "index": 6, "kind": "property", 
"displayName": "Use Global Ssl Context Parameters", "group": "security", 
"label": "security", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Enable usage of global SSL context 
parameters." }
   },
   "headers": {
-    "operationName": { "index": 0, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The name of the operation.", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" },
-    "operationNamespace": { "index": 1, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The operation namespace.", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAMESPACE"
 },
+    "CamelCxfOperationName": { "index": 0, "kind": "header", "displayName": 
"", "group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The name of the operation.", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" },
+    "CamelCxfOperationNamespace": { "index": 1, "kind": "header", 
"displayName": "", "group": "common", "label": "", "required": false, 
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "The operation namespace.", 
"constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAMESPACE"
 },
     "CamelDestinationOverrideUrl": { "index": 2, "kind": "header", 
"displayName": "", "group": "common", "label": "", "required": false, 
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "The destination override url", 
"constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#DESTINATION_OVERRIDE_URL"
 },
     "ResponseContext": { "index": 3, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "Map<String, 
Object>", "deprecated": false, "deprecationNote": "", "autowired": false, 
"secret": false, "description": "The response context", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#RESPONSE_CONTEXT" },
     "CamelAuthentication": { "index": 4, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": 
"javax.security.auth.Subject", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "description": "The authentication", 
"constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#AUTHENTICATION" },
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxfrs.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxfrs.json
index cbe9b93c3595..f02c90311f9b 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxfrs.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/cxfrs.json
@@ -33,7 +33,7 @@
     "useGlobalSslContextParameters": { "index": 5, "kind": "property", 
"displayName": "Use Global Ssl Context Parameters", "group": "security", 
"label": "security", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Enable usage of global SSL context 
parameters." }
   },
   "headers": {
-    "operationName": { "index": 0, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The name of the operation.", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" },
+    "CamelCxfOperationName": { "index": 0, "kind": "header", "displayName": 
"", "group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The name of the operation.", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" },
     "CamelAuthentication": { "index": 1, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": 
"javax.security.auth.Subject", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "description": "The authentication", 
"constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#AUTHENTICATION" },
     "CamelHttpMethod": { "index": 2, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The http method to use", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#HTTP_METHOD" },
     "CamelHttpPath": { "index": 3, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The http path", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#HTTP_PATH" },
diff --git 
a/components/camel-cxf/camel-cxf-common/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java
 
b/components/camel-cxf/camel-cxf-common/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java
index 5a258018c4d1..51608da0035b 100644
--- 
a/components/camel-cxf/camel-cxf-common/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java
+++ 
b/components/camel-cxf/camel-cxf-common/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java
@@ -48,9 +48,9 @@ public final class CxfConstants {
     public static final String ACCEPT_CONTENT_TYPE = 
Message.ACCEPT_CONTENT_TYPE;
 
     @Metadata(description = "The name of the operation.", javaType = "String")
-    public static final String OPERATION_NAME = "operationName";
+    public static final String OPERATION_NAME = "CamelCxfOperationName";
     @Metadata(description = "The operation namespace.", javaType = "String", 
applicableFor = SCHEME_CXF)
-    public static final String OPERATION_NAMESPACE = "operationNamespace";
+    public static final String OPERATION_NAMESPACE = 
"CamelCxfOperationNamespace";
     public static final String SPRING_CONTEXT_ENDPOINT = "bean:";
     @Metadata(description = "The destination override url", javaType = 
"String", applicableFor = SCHEME_CXF)
     public static final String DESTINATION_OVERRIDE_URL = 
Exchange.DESTINATION_OVERRIDE_URL;
diff --git 
a/components/camel-cxf/camel-cxf-rest/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxrs/cxfrs.json
 
b/components/camel-cxf/camel-cxf-rest/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxrs/cxfrs.json
index cbe9b93c3595..f02c90311f9b 100644
--- 
a/components/camel-cxf/camel-cxf-rest/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxrs/cxfrs.json
+++ 
b/components/camel-cxf/camel-cxf-rest/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxrs/cxfrs.json
@@ -33,7 +33,7 @@
     "useGlobalSslContextParameters": { "index": 5, "kind": "property", 
"displayName": "Use Global Ssl Context Parameters", "group": "security", 
"label": "security", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Enable usage of global SSL context 
parameters." }
   },
   "headers": {
-    "operationName": { "index": 0, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The name of the operation.", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" },
+    "CamelCxfOperationName": { "index": 0, "kind": "header", "displayName": 
"", "group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The name of the operation.", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" },
     "CamelAuthentication": { "index": 1, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": 
"javax.security.auth.Subject", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "description": "The authentication", 
"constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#AUTHENTICATION" },
     "CamelHttpMethod": { "index": 2, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The http method to use", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#HTTP_METHOD" },
     "CamelHttpPath": { "index": 3, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The http path", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#HTTP_PATH" },
diff --git 
a/components/camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc 
b/components/camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc
index 144fa10affa0..e5c97f6400b8 100644
--- a/components/camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc
+++ b/components/camel-cxf/camel-cxf-rest/src/main/docs/cxfrs-component.adoc
@@ -179,7 +179,7 @@ Serviced by the following route:
 [source,java]
 
--------------------------------------------------------------------------------------------
 from("cxfrs:bean:rsServer?bindingStyle=SimpleConsumer")
-    .recipientList(simple("direct:${header.operationName}"));
+    .recipientList(simple("direct:${header.CamelCxfOperationName}"));
 
 from("direct:newCustomer")
     .log("Request: type=${header.type}, active=${header.active}, 
customerData=${body}");
diff --git 
a/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java
 
b/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java
index 6aaa10e4ebf6..a53a16842746 100644
--- 
a/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java
+++ 
b/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java
@@ -70,7 +70,7 @@ public class CxfRsConsumerSimpleBindingImplTest extends 
CamelTestSupport {
             @Override
             public void configure() {
                 from(CXF_RS_ENDPOINT_URI)
-                        
.recipientList(simple("direct:${header.operationName}"));
+                        
.recipientList(simple("direct:${header.CamelCxfOperationName}"));
 
                 from("direct:getCustomer").process(new Processor() {
                     @Override
diff --git 
a/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java
 
b/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java
index af6b165c53b8..866e2bcded5f 100644
--- 
a/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java
+++ 
b/components/camel-cxf/camel-cxf-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java
@@ -85,7 +85,7 @@ public class CxfRsConsumerSimpleBindingTest extends 
CamelTestSupport {
         return new RouteBuilder() {
             public void configure() {
                 from(CXF_RS_ENDPOINT_URI)
-                        
.recipientList(simple("direct:${header.operationName}"));
+                        
.recipientList(simple("direct:${header.CamelCxfOperationName}"));
 
                 from("direct:getCustomer").process(new Processor() {
                     public void process(Exchange exchange) throws Exception {
diff --git 
a/components/camel-cxf/camel-cxf-soap/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxws/cxf.json
 
b/components/camel-cxf/camel-cxf-soap/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxws/cxf.json
index 85aaa628f061..59ab53bd4b67 100644
--- 
a/components/camel-cxf/camel-cxf-soap/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxws/cxf.json
+++ 
b/components/camel-cxf/camel-cxf-soap/src/generated/resources/META-INF/org/apache/camel/component/cxf/jaxws/cxf.json
@@ -34,8 +34,8 @@
     "useGlobalSslContextParameters": { "index": 6, "kind": "property", 
"displayName": "Use Global Ssl Context Parameters", "group": "security", 
"label": "security", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Enable usage of global SSL context 
parameters." }
   },
   "headers": {
-    "operationName": { "index": 0, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The name of the operation.", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" },
-    "operationNamespace": { "index": 1, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The operation namespace.", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAMESPACE"
 },
+    "CamelCxfOperationName": { "index": 0, "kind": "header", "displayName": 
"", "group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The name of the operation.", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAME" },
+    "CamelCxfOperationNamespace": { "index": 1, "kind": "header", 
"displayName": "", "group": "common", "label": "", "required": false, 
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "The operation namespace.", 
"constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#OPERATION_NAMESPACE"
 },
     "CamelDestinationOverrideUrl": { "index": 2, "kind": "header", 
"displayName": "", "group": "common", "label": "", "required": false, 
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "The destination override url", 
"constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#DESTINATION_OVERRIDE_URL"
 },
     "ResponseContext": { "index": 3, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "Map<String, 
Object>", "deprecated": false, "deprecationNote": "", "autowired": false, 
"secret": false, "description": "The response context", "constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#RESPONSE_CONTEXT" },
     "CamelAuthentication": { "index": 4, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": 
"javax.security.auth.Subject", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "description": "The authentication", 
"constantName": 
"org.apache.camel.component.cxf.common.message.CxfConstants#AUTHENTICATION" },
diff --git 
a/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc 
b/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc
index 7c3b9f5c2bda..6b1823afae1d 100644
--- a/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc
+++ b/components/camel-cxf/camel-cxf-soap/src/main/docs/cxf-component.adoc
@@ -441,7 +441,7 @@ As an alternative, you can add a message header for it as 
demonstrated in https:
 You can configure the CXF endpoint with the Spring configuration file
 shown below, and you can also embed the endpoint into the `camelContext`
 tags. When you are invoking the service endpoint, you can set the
-`operationName` and `operationNamespace` headers to explicitly state
+`CamelCxfOperationName` and `CamelCxfOperationNamespace` headers to explicitly 
state
 which operation you are calling.
 
 [source,xml]
diff --git 
a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfProducer.java
 
b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfProducer.java
index 8b5ee6fab7f5..ed086aa97fee 100644
--- 
a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfProducer.java
+++ 
b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfProducer.java
@@ -411,7 +411,7 @@ public class CxfProducer extends DefaultAsyncProducer {
      * null:
      * </p>
      * <ul>
-     * <li>Using the in message header "operationName".</li>
+     * <li>Using the in message header "CamelCxfOperationName".</li>
      * <li>Using the defaultOperationName option value from the 
CxfEndpoint.</li>
      * <li>Using the first operation which is find from the CxfEndpoint 
Operations list.</li>
      * <ul>
diff --git 
a/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java
 
b/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java
index 038d01e7c1ef..634556871aef 100644
--- 
a/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java
+++ 
b/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingImplTest.java
@@ -68,7 +68,7 @@ public class CxfRsConsumerSimpleBindingImplTest extends 
CamelTestSupport {
             @Override
             public void configure() {
                 from(CXF_RS_ENDPOINT_URI)
-                        
.recipientList(simple("direct:${header.operationName}"));
+                        
.recipientList(simple("direct:${header.CamelCxfOperationName}"));
 
                 from("direct:getCustomer").process(new Processor() {
                     @Override
diff --git 
a/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java
 
b/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java
index 6dd9a273d062..216cc1e3cd9a 100644
--- 
a/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java
+++ 
b/components/camel-cxf/camel-cxf-spring-rest/src/test/java/org/apache/camel/component/cxf/jaxrs/simplebinding/CxfRsConsumerSimpleBindingTest.java
@@ -84,7 +84,7 @@ public class CxfRsConsumerSimpleBindingTest extends 
CamelTestSupport {
         return new RouteBuilder() {
             public void configure() {
                 from(CXF_RS_ENDPOINT_URI)
-                        
.recipientList(simple("direct:${header.operationName}"));
+                        
.recipientList(simple("direct:${header.CamelCxfOperationName}"));
 
                 from("direct:getCustomer").process(new Processor() {
                     public void process(Exchange exchange) throws Exception {
diff --git 
a/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfPayloadProviderRouterTest.java
 
b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfPayloadProviderRouterTest.java
index 82f7352d83d6..4c0f79ce1b01 100644
--- 
a/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfPayloadProviderRouterTest.java
+++ 
b/components/camel-cxf/camel-cxf-spring-soap/src/test/java/org/apache/camel/component/cxf/CxfPayloadProviderRouterTest.java
@@ -22,6 +22,7 @@ import jakarta.xml.ws.Service;
 import javax.xml.namespace.QName;
 
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.cxf.common.message.CxfConstants;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.interceptor.Fault;
@@ -70,8 +71,9 @@ public class CxfPayloadProviderRouterTest extends 
AbstractCXFGreeterRouterTest {
         return new RouteBuilder() {
             public void configure() {
                 
from("cxf:bean:routerEndpoint?synchronous=true&dataFormat=PAYLOAD")
-                        .setHeader("operationNamespace", 
constant("http://camel.apache.org/cxf/jaxws/dispatch";))
-                        .setHeader("operationName", constant("Invoke"))
+                        .setHeader(CxfConstants.OPERATION_NAMESPACE,
+                                
constant("http://camel.apache.org/cxf/jaxws/dispatch";))
+                        .setHeader(CxfConstants.OPERATION_NAME, 
constant("Invoke"))
                         
.to("cxf:bean:serviceEndpoint?synchronous=true&dataFormat=PAYLOAD");
             }
         };
diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
index d39574915e67..9830b267a59f 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
@@ -356,6 +356,80 @@ work without changes. Routes that set the header by its 
literal string value
 (for example `setHeader("SEARCH_QUERY", ...)`) must be updated to use the
 new value (`setHeader("CamelElasticsearchSearchQuery", ...)`).
 
+=== camel-cxf
+
+The Exchange header constants in `CxfConstants` (module `camel-cxf-common`, 
shared
+by `camel-cxf` and `camel-cxfrs`) have been renamed to follow the Camel naming
+convention used across the rest of the component catalog. The Java field names 
are
+unchanged; only the header string values have changed:
+
+[options="header"]
+|===
+| Constant | Previous value | New value
+| `CxfConstants.OPERATION_NAME` | `operationName` | `CamelCxfOperationName`
+| `CxfConstants.OPERATION_NAMESPACE` | `operationNamespace` | 
`CamelCxfOperationNamespace`
+|===
+
+Routes that reference the constant symbolically (for example
+`setHeader(CxfConstants.OPERATION_NAME, ...)`) continue to work without 
changes.
+Routes that set the header by its literal string value (for example
+`setHeader("operationName", ...)`) must be updated to use the new value
+(`setHeader("CamelCxfOperationName", ...)`).
+
+In particular, the documented `cxfrs` `SimpleConsumer` dispatch idiom that 
routes
+on the operation name by its literal header name must be updated:
+
+[source,java]
+----
+// before
+from("cxfrs:bean:rsServer?bindingStyle=SimpleConsumer")
+    .recipientList(simple("direct:${header.operationName}"));
+
+// after
+from("cxfrs:bean:rsServer?bindingStyle=SimpleConsumer")
+    .recipientList(simple("direct:${header.CamelCxfOperationName}"));
+----
+
+==== Behaviour change: cross-transport propagation of the operation header
+
+Because the renamed header value now begins with `Camel`, it is filtered by the
+standard transport `HeaderFilterStrategy` (`JmsHeaderFilterStrategy`,
+`HttpHeaderFilterStrategy`, etc.) when crossing a transport boundary, by design
+— `Camel*` headers are framework-internal and are not propagated over the wire.
+
+Routes that bridge an external transport (JMS, HTTP, ...) into a `cxf:` 
producer
+and select the SOAP operation from a header supplied by the sender must
+therefore carry the operation in a non-`Camel`-prefixed application header and
+map it to `CxfConstants.OPERATION_NAME` (`CamelCxfOperationName`) in the route
+between the transport `from` and the `cxf:` `to`:
+
+[source,xml]
+----
+<!-- before (pre-4.21) -->
+<route>
+    <from uri="jms:queue:bridge.cxf"/>
+    <to uri="cxf://bean:serviceEndpoint"/>
+</route>
+<!-- caller sets the header keyed by the pre-4.21 value:
+     setHeader("operationName", "greetMe") -->
+
+<!-- after -->
+<route>
+    <from uri="jms:queue:bridge.cxf"/>
+    <setHeader name="CamelCxfOperationName">
+        <simple>${header.operationName}</simple>
+    </setHeader>
+    <to uri="cxf://bean:serviceEndpoint"/>
+</route>
+<!-- caller sets a non-Camel-prefixed application carrier header (any name
+     that is not stripped by the transport HeaderFilterStrategy works);
+     the route restores the CXF operation header after the transport hop. -->
+----
+
+The same pattern applies to HTTP-based bridges (`platform-http`/`jetty`/`netty
+-http`/`http` -> `cxf:`) and any other transport whose default
+`HeaderFilterStrategy` filters `Camel*` headers.
+
 === camel-aws2-s3
 
 The `listObjects` operation now uses the `ListObjectsV2` AWS API instead of 
the deprecated `ListObjects` API.
diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfEndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfEndpointBuilderFactory.java
index d7955cecfcfb..ddad0322eb9e 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfEndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfEndpointBuilderFactory.java
@@ -2653,10 +2653,10 @@ public interface CxfEndpointBuilderFactory {
          * 
          * Group: common
          * 
-         * @return the name of the header {@code operationName}.
+         * @return the name of the header {@code CxfOperationName}.
          */
-        public String operationName() {
-            return "operationName";
+        public String cxfOperationName() {
+            return "CamelCxfOperationName";
         }
         /**
          * The operation namespace.
@@ -2665,10 +2665,10 @@ public interface CxfEndpointBuilderFactory {
          * 
          * Group: common
          * 
-         * @return the name of the header {@code operationNamespace}.
+         * @return the name of the header {@code CxfOperationNamespace}.
          */
-        public String operationNamespace() {
-            return "operationNamespace";
+        public String cxfOperationNamespace() {
+            return "CamelCxfOperationNamespace";
         }
         /**
          * The destination override url.
diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfRsEndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfRsEndpointBuilderFactory.java
index 28a6350b88ff..30cb6a142775 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfRsEndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfRsEndpointBuilderFactory.java
@@ -2171,10 +2171,10 @@ public interface CxfRsEndpointBuilderFactory {
          * 
          * Group: common
          * 
-         * @return the name of the header {@code operationName}.
+         * @return the name of the header {@code CxfOperationName}.
          */
-        public String operationName() {
-            return "operationName";
+        public String cxfOperationName() {
+            return "CamelCxfOperationName";
         }
         /**
          * The authentication.
diff --git 
a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JettyRecipientListCxfIssueTest.java
 
b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JettyRecipientListCxfIssueTest.java
index 6e763dbb493f..f2566c5045bc 100644
--- 
a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JettyRecipientListCxfIssueTest.java
+++ 
b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JettyRecipientListCxfIssueTest.java
@@ -61,6 +61,9 @@ public class JettyRecipientListCxfIssueTest extends 
CamelSpringTestSupport {
 
         // send a message to jetty
         Exchange out = 
template.request("http://0.0.0.0:{{RecipientListCxfTest.port3}}/myapp";, 
exchange -> {
+            // Use the non-Camel-prefixed carrier header convention so it 
survives
+            // the HTTP transport boundary; the receiver maps it to the renamed
+            // CxfConstants.OPERATION_NAME value before any cxf: call.
             exchange.getIn().setHeader("operationName", "greetMe");
             exchange.getIn().setBody(request);
         });
diff --git 
a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsToCxfInOutTest.java
 
b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsToCxfInOutTest.java
index 4bc25d7c7c9f..5948e0e4003f 100644
--- 
a/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsToCxfInOutTest.java
+++ 
b/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/JmsToCxfInOutTest.java
@@ -17,7 +17,6 @@
 package org.apache.camel.itest.greeter;
 
 import org.apache.camel.ProducerTemplate;
-import org.apache.camel.component.cxf.common.message.CxfConstants;
 import org.apache.camel.itest.utils.extensions.JmsServiceExtension;
 import org.apache.camel.test.AvailablePortFinder;
 import org.apache.camel.test.spring.junit6.CamelSpringTest;
@@ -52,12 +51,16 @@ public class JmsToCxfInOutTest {
     void testJmsToCxfInOut() {
         assertNotNull(template);
 
-        String out = template.requestBodyAndHeader("jms:queue:bridge.cxf", 
"Willem", CxfConstants.OPERATION_NAME, "greetMe",
+        // The CXF operation header value now begins with "Camel" and is 
therefore
+        // filtered by JmsHeaderFilterStrategy at the transport boundary. Send 
the
+        // operation as a non-Camel-prefixed carrier header; the route maps it 
to
+        // CxfConstants.OPERATION_NAME between the JMS from and the cxf: to.
+        String out = template.requestBodyAndHeader("jms:queue:bridge.cxf", 
"Willem", "operationName", "greetMe",
                 String.class);
         assertEquals("Hello Willem", out);
 
         // call for the other operation
-        out = template.requestBodyAndHeader("jms:queue:bridge.cxf", new 
Object[0], CxfConstants.OPERATION_NAME, "sayHi",
+        out = template.requestBodyAndHeader("jms:queue:bridge.cxf", new 
Object[0], "operationName", "sayHi",
                 String.class);
         assertEquals("Bonjour", out);
     }
diff --git 
a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/JmsToCxfInOutTest-context.xml
 
b/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/JmsToCxfInOutTest-context.xml
index 05ca35158872..fb4d29a56a18 100644
--- 
a/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/JmsToCxfInOutTest-context.xml
+++ 
b/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/JmsToCxfInOutTest-context.xml
@@ -63,6 +63,14 @@
         <route>
             <from uri="jms:queue:bridge.cxf"/>
             <to uri="log:jms"/>
+            <!-- The CXF operation header (CxfConstants.OPERATION_NAME =
+                 "CamelCxfOperationName") is filtered at the JMS boundary by
+                 JmsHeaderFilterStrategy, which strips "Camel*" headers by 
design.
+                 Restore it from the application-level carrier header set by 
the
+                 sender. See the 4.21 upgrade guide. -->
+            <setHeader name="CamelCxfOperationName">
+                <simple>${header.operationName}</simple>
+            </setHeader>
             <to uri="cxf://bean:serviceEndpoint"/>
         </route>
 


Reply via email to