CXFRS header DESTINATION_OVERRIDE_URL ignored after changing it twice

Solution Unverified - Updated -

Environment

  • Red Hat Fuse (Fuse) 6.3

Issue

  • Using the Camel CXFRS Endpoint with Proxy Client API (CAMEL_CXF_RS_USING_HTTP_API = false) the Exchange.DESTINATION_OVERRIDE_URL header is ignored after the second call.

Resolution

There are two workarounds:

  • Upgrade to Red Hat Fuse 6.3 R11 (377) and use the Spring based Endpoint.
  • Use the HTTP Client API

Root Cause

This issue is caused by a bug in the Camel CXFRS component which caches each new WS URL with the CXFRS client bean.
Just before caching it, the Camel CXFRS component changes the WS URL inside the CXFRS client bean.
Then any further use of the CXFRS client bean will ignore the requested WS URL but will use the last one cached.

  • bug resolved for Spring based component only, in the Fuse 6.3 R11 release ENTESB-9951
  • bug open for the Blueprint based component only ENTESB-10618

Diagnostic Steps

Enable CXFRS logging.
This can be done by setting log4j.logger.org.apache.cxf=DEBUG at the end of the configuration file org.ops4j.pax.logging.cfg as per Red Hat knowledge solution: How to display CXF endpoint logs at desired level in Red Hat Fuse 6?

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments