Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9663

CXF Header dropped when multiple CXF endpoint in the same route

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Incomplete
    • 2.16.2
    • None
    • camel-cxfrs, camel-test
    • None
    • Moderate

    Description

      We have multiple cxf endpoint in the same camel route.

      Following route causes the problem
      from("cxfrs:server....")
      .process("prepareHeader")
      .to("cxfrs:client....")

      When CXF receives a request, It sets the header for a response class which is to be returned by rsserver. Same response class is passed to rsclient in the camel header. For our usecase we are substituting the rsclient response class. When rsclient invokes the cxf endpoint we could see cxf headers in the interceptor but the same headers are not there in camel headers.

      I have debugged the cxf code and found the issue in the following code base
      Class: CxfRsProducer
      Method: invokeHttpClient
      Line number: 222

      invokeHttpClient method invokes cxfendpoint using cxf code base and converts into the user-defined-class which in turn drops the cxf headers. So CXF headers are not mapped to the camel header. When we remove the response-class in the camel header then invoke method from CxfRsProducer:210-line is invoked.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sureez Suresh Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: