Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-10618

CXFRS header "CamelDestinationOverrideUrl" ignored after changing it twice

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: jboss-fuse-6.3
    • Fix Version/s: fuse-7.4-GA, fuse-6.x-GA
    • Component/s: Camel, CXF
    • Labels:
      None
    • Sprint:
      Fuse 7.4 Sprint 47 - Bug Fix
    • Steps to Reproduce:
      Hide

      Implements a Processor like this one:

      		Message in = exchange.getIn();
      		long counter = (long) exchange.getProperty(Exchange.TIMER_COUNTER);
      		String destURL = (counter % 2 == 1) ? "http://localhost:9080/route" : "http://localhost:9081/route";
      		log.info("Destination URL:{}",destURL);
      		in.setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API, false);
      		in.setHeader(CxfConstants.OPERATION_NAME, "getCustomers");
      		in.setHeader(Exchange.ACCEPT_CONTENT_TYPE, "application/json");
      		in.setHeader(Exchange.DESTINATION_OVERRIDE_URL, destURL);
      		in.setHeader(Exchange.HTTP_METHOD, "GET");
      

      Followed by a Blueprint based cxf:rsClient with logging enabled and you will see that the first call use the url http://localhost:9080/route, the second http://localhost:9081/route but starting from the third the url will be always http://localhost:9080/route.

      Show
      Implements a Processor like this one: Message in = exchange.getIn(); long counter = ( long ) exchange.getProperty(Exchange.TIMER_COUNTER); String destURL = (counter % 2 == 1) ? "http: //localhost:9080/route" : "http://localhost:9081/route" ; log.info( "Destination URL:{}" ,destURL); in.setHeader(CxfConstants.CAMEL_CXF_RS_USING_HTTP_API, false ); in.setHeader(CxfConstants.OPERATION_NAME, "getCustomers" ); in.setHeader(Exchange.ACCEPT_CONTENT_TYPE, "application/json" ); in.setHeader(Exchange.DESTINATION_OVERRIDE_URL, destURL); in.setHeader(Exchange.HTTP_METHOD, "GET" ); Followed by a Blueprint based cxf:rsClient with logging enabled and you will see that the first call use the url http://localhost:9080/route , the second http://localhost:9081/route but starting from the third the url will be always http://localhost:9080/route .
    • QE Test Coverage:
      ?

      Description

      In a route that changes the destination of rsClient in CXFRS dynamically, using the Header "CamelDestinationOverrideUrl", it stops working when set for second time.
      This issue has been partially fixed in the 6.3/R11 with the JIRA ENTESB-9951 but only for Spring based endpoint, the issue still exists for the Blueprint based endpoint.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  oscerd Andrea Cosentino
                  Reporter:
                  rhn-support-agagliar Antonio Gagliardi
                  Tester:
                  Viliam Kasala
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: