cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Kozlov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-6106) ClientResponseFilterInterceptor wraps client response exchange message into ClientRequestContextImpl - as a result code can't access client request context
Date Sat, 15 Nov 2014 02:07:33 GMT
Dmitry Kozlov created CXF-6106:
----------------------------------

             Summary: ClientResponseFilterInterceptor wraps client response exchange message
into ClientRequestContextImpl - as a result code can't access client request context
                 Key: CXF-6106
                 URL: https://issues.apache.org/jira/browse/CXF-6106
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 3.0.2, 3.0.1
         Environment: ||OS| Windows 7|
||JVM| java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)|
            Reporter: Dmitry Kozlov
            Priority: Critical
         Attachments: both-contexts-wrap-same-response-message.png

*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|https://github.com/apache/cxf/blob/efbfc2fa90b21e7766f85cb36445146e5c516061/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/spec/ClientResponseFilterInterceptor.java#L57]:
{code:java}
            ClientRequestContext reqContext = new ClientRequestContextImpl(inMessage.getExchange().getInMessage(),
                                                                        true);
{code}

Thus {{ClientRequestContext}} implementation wraps response message instead of request:

!both-contexts-wrap-same-response-message.png!

As a result majority of request context functionality is broken including predefined fields
like {{[ClientRequestContext.getUri()|https://jax-rs-spec.java.net/nonav/2.0-rev-a/apidocs/javax/ws/rs/client/ClientRequestContext.html#getUri()]}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message