Skip to content

[backport camel-4.14.x] CAMEL-23526: camel-cxf - align Exchange header constant names with Camel naming convention#23376

Merged
oscerd merged 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23326-to-camel-4.14.x
May 21, 2026
Merged

[backport camel-4.14.x] CAMEL-23526: camel-cxf - align Exchange header constant names with Camel naming convention#23376
oscerd merged 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23326-to-camel-4.14.x

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 20, 2026

Backport of #23326

Cherry-pick of #23326 onto camel-4.14.x.

Manual adjustments during cherry-pick

  • Upgrade-guide entry moved from camel-4x-upgrade-guide-4_21.adoc (does not
    exist on this branch) to camel-4x-upgrade-guide-4_14.adoc, appended after the
    existing === camel-aws2-sqs / === camel-aws2-sns entries that recently
    landed on this branch via CAMEL-23506. The matching 4_14.adoc entry on main
    will be synced in a follow-up PR per CLAUDE.md's backport upgrade-guide policy.
  • Resolved import conflict in CxfPayloadProviderRouterTest.java: kept
    only the CxfConstants import; left the existing FQCN usage of
    org.apache.cxf.endpoint.Client / ClientProxy intact to avoid pulling in
    the unrelated OpenRewrite FQCN refactor that only exists on main.
  • Regenerated component metadata, catalog, and endpoint DSL using
    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 by
transport HeaderFilterStrategy (JmsHeaderFilterStrategy,
HttpHeaderFilterStrategy, etc.) at every transport boundary. Routes that
bridge an external transport into a cxf: producer must carry the operation
in a non-Camel-prefixed application header and map it to
CxfConstants.OPERATION_NAME between the transport from and the cxf: 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.

…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 oscerd merged commit 0138da4 into apache:camel-4.14.x May 21, 2026
3 checks passed
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>
@oscerd oscerd deleted the backport/23326-to-camel-4.14.x branch May 22, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant