Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6106

ClientResponseFilterInterceptor wraps client response exchange message into ClientRequestContextImpl - as a result code can't access client request context

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.0.1, 3.0.2
    • Fix Version/s: 3.0.3, 2.7.14, 3.1
    • Component/s: JAX-RS
    • Labels:
    • Environment:
    • Estimated Complexity:
      Novice

      Description

      Long story short: ClientResponseFilter gets invalid ClientRequestContext objects. As a result the majority of functionality doesn't work, e.g. requestContext.getUri() will always return null.

      This happens due to these lines:

      at org.apache.cxf.jaxrs.client.spec.ClientResponseFilterInterceptor.handleMessage(ClientResponseFilterInterceptor.java:57)
      ClientRequestContext reqContext = new ClientRequestContextImpl(inMessage.getExchange().getInMessage(),
                                                                  true);
      

      Thus ClientRequestContext implementation wraps response message instead of request:

      As a result majority of request context functionality is broken including predefined fields like ClientRequestContext.getUri().

        Attachments

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              kozlovda Dmitry Kozlov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: