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

CXFRS header "CamelDestinationOverrideUrl" ignored after changing it twice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.4-GA, fuse-6.x-GA
    • jboss-fuse-6.3
    • Camel, CXF
    • None
    • % %
    • +
    • 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 .
    • Fuse 7.4 Sprint 47 - Bug Fix

      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.

              acosenti Andrea Cosentino
              rhn-support-agagliar Antonio Gagliardi
              Viliam Kasala Viliam Kasala
              Federico Mariani
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: