[backport camel-4.14.x] CAMEL-23526: camel-cxf - align Exchange header constant names with Camel naming convention#23376
Merged
oscerd merged 1 commit intoMay 21, 2026
Conversation
…mel naming convention (apache#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 <ancosen@gmail.com> * 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 <ancosen@gmail.com> * 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 <ancosen@gmail.com> --------- Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
oscerd
added a commit
that referenced
this pull request
May 21, 2026
…23377) Mirrors the `=== camel-cxf` entry added by the backport (#23376) into `camel-4x-upgrade-guide-4_14.adoc` on main, so the canonical multi-version upgrade-guide history on main stays in sync with the camel-4.14.x maintenance branch. Documents the constant rename (operationName / operationNamespace -> CamelCxfOperationName / CamelCxfOperationNamespace), the cxfrs SimpleConsumer dispatch-idiom change, and the cross-transport propagation behaviour change. Per CLAUDE.md's backport upgrade-guide policy. Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #23326
Cherry-pick of #23326 onto
camel-4.14.x.camel-4.14.x7240570a056Manual adjustments during cherry-pick
camel-4x-upgrade-guide-4_21.adoc(does notexist on this branch) to
camel-4x-upgrade-guide-4_14.adoc, appended after theexisting
=== camel-aws2-sqs/=== camel-aws2-snsentries that recentlylanded on this branch via CAMEL-23506. The matching
4_14.adocentry onmainwill be synced in a follow-up PR per CLAUDE.md's backport upgrade-guide policy.
CxfPayloadProviderRouterTest.java: keptonly the
CxfConstantsimport; left the existing FQCN usage oforg.apache.cxf.endpoint.Client/ClientProxyintact to avoid pulling inthe unrelated OpenRewrite FQCN refactor that only exists on
main.4.14.x's generators (full reactor build,
-DskipTests).Behaviour change carried over
Because the renamed header value now begins with
Camel, it is filtered bytransport
HeaderFilterStrategy(JmsHeaderFilterStrategy,HttpHeaderFilterStrategy, etc.) at every transport boundary. Routes thatbridge an external transport into a
cxf:producer must carry the operationin a non-
Camel-prefixed application header and map it toCxfConstants.OPERATION_NAMEbetween the transportfromand thecxf:to.The 4.14 upgrade guide entry documents this with the standard before/after
example.
JIRA: https://issues.apache.org/jira/browse/CAMEL-23526
Backport prepared by Claude Code on behalf of Andrea Cosentino.