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] [Commented] (CXF-6106) ClientResponseFilterInterceptor wraps client response exchange message into ClientRequestContextImpl - as a result code can't access client request context
Date Mon, 17 Nov 2014 22:34:34 GMT

    [ https://issues.apache.org/jira/browse/CXF-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14215316#comment-14215316
] 

Dmitry Kozlov commented on CXF-6106:
------------------------------------

Got it, thanks.

> 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.1, 3.0.2
>         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
>            Assignee: Sergey Beryozkin
>            Priority: Critical
>              Labels: jax-rs, jaxrs
>             Fix For: 3.1.0, 3.0.3, 2.7.14
>
>         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|title=at org.apache.cxf.jaxrs.client.spec.ClientResponseFilterInterceptor.handleMessage(ClientResponseFilterInterceptor.java:57)}
> 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