You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Minto van der Sluis (JIRA)" <ji...@apache.org> on 2013/06/04 08:58:22 UTC

[jira] [Commented] (CXF-5053) JAX-RS behavior differs from JAX-WS for MessageContext.get( Message.class.getName() )

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

Minto van der Sluis commented on CXF-5053:
------------------------------------------

Just found out that there is another way to access the message:

PhaseInterceptorChain.getCurrentMessage()

Nevertheless consistent behavior across frontends (JAX-WS and JAX-RS) would be nice.
                
> JAX-RS behavior differs from JAX-WS for MessageContext.get( Message.class.getName() ) 
> --------------------------------------------------------------------------------------
>
>                 Key: CXF-5053
>                 URL: https://issues.apache.org/jira/browse/CXF-5053
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>            Reporter: Minto van der Sluis
>         Attachments: jira-5053.patch
>
>
> In JAX-WS:
>   WebServiceContext webServiceContext; // injected with proper value.
>   Message message = Message.class.cast( webServiceContext.getMessageContext().get( Message.class.getName() ) );
> results in a valid message object reference (not null)
> In JAX-RS however similar code:
>   MessageContext jaxrsContext; // injected with proper value.
>   Message message = Message.class.cast( jaxrsContext.get( Message.class.getName() ) );
> results in an invalid message object (null);

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira