Federico Mariani created CAMEL-24183:
----------------------------------------
Summary: camel-cxfrs - Spring rsClient producer silently drops
endpoint URI options
Key: CAMEL-24183
URL: https://issues.apache.org/jira/browse/CAMEL-24183
Project: Camel
Issue Type: Bug
Components: camel-cxfrs
Reporter: Federico Mariani
Assignee: Federico Mariani
*Severity:* High
h3. Problem
{{CxfRsSpringEndpoint.setupJAXRSClientFactoryBean}} overrides the base method
but never calls {{setupCommonFactoryProperties(cfb)}}:
{code:java}
protected void setupJAXRSClientFactoryBean(JAXRSClientFactoryBean cfb, String
address) {
configurer.configureBean(beanId, cfb);
getNullSafeCxfRsEndpointConfigurer().configure(cfb);
cfb.setAddress(address);
cfb.setThreadSafe(true);
}
{code}
The plain {{CxfRsEndpoint.setupJAXRSClientFactoryBean}} calls
{{setupCommonFactoryProperties(cfb)}} (providers, features, interceptors,
properties, logging feature, skipFaultLogging...).
{{CxfRsProducer.ClientFactoryBeanCache}} goes through this method for every
client factory, so for a Spring {{rsClient}} those options are accepted and set
on the endpoint, then *silently ignored* for the producer - while
{{CxfRsComponent}} documents that URI query options should override Spring bean
config. The server path is unaffected ({{setupJAXRSServerFactoryBean}} is
inherited).
h3. Impact
{{to("cxfrs://bean://rsClient?loggingFeatureEnabled=true")}} (or
{{?providers=#jacksonProvider}}, {{?skipFaultLogging=true}}, interceptors,
{{properties.x=y}}) has no effect; the same URI against a non-Spring {{cxfrs:}}
endpoint works.
h3. Location
{{components/camel-cxf/camel-cxf-spring-rest/src/main/java/org/apache/camel/component/cxf/spring/jaxrs/CxfRsSpringEndpoint.java}}
~67-74.
h3. Fix
Call {{setupCommonFactoryProperties(cfb)}} from the override (after
{{configurer.configureBean(beanId, cfb)}} so URI options win over XML),
matching the plain implementation's ordering.
----
_Filed by Claude Code (Claude Fable) on behalf of Federico Mariani (GitHub:
Croway). Findings from an AI-assisted code review of the camel-cxf component
family; each item was verified against the current source and git history.
Items marked *[reproducer attached]* include a failing JUnit test that
demonstrates the defect._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)