[jboss-jira] [JBoss JIRA] (AS7-4201) Cannot be cast org.apache.cxf.jaxws.context.WrappedMessageContext to javax.xml.ws.handler.soap.SOAPMessageContext

Alessio Soldano (JIRA) jira-events at lists.jboss.org
Tue Oct 16 04:16:01 EDT 2012


    [ https://issues.jboss.org/browse/AS7-4201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12726734#comment-12726734 ] 

Alessio Soldano commented on AS7-4201:
--------------------------------------

Can you please provide more in info on the handler class you're getting the context in as shown above (I assume you're doing that in a handler)?
My bet is that your handler is not a javax.xml.ws.handler.soap.SOAPHandler, hence the message context is not strictly required to be an instance of SOAPMessageContext, but only of MessageContext (e.g. the WrappedMessageContext, which only implements MessageContext).
                
> Cannot be cast org.apache.cxf.jaxws.context.WrappedMessageContext to javax.xml.ws.handler.soap.SOAPMessageContext
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: AS7-4201
>                 URL: https://issues.jboss.org/browse/AS7-4201
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Web Services
>    Affects Versions: 7.1.1.Final
>            Reporter: Will Tatam
>            Assignee: Alessio Soldano
>
> SOAPMessageContext jaxwsContext = (SOAPMessageContext) wsContext.getMessageContext();
> Caused by: java.lang.ClassCastException: org.apache.cxf.jaxws.context.WrappedMessageContext cannot be cast to javax.xml.ws.handler.soap.SOAPMessageContext
> This was working fine on AS 5.1.
> If I check the docs for WrappedMessageContext it's sub sclass is SOAPMessageContextImpl which does implement javax.xml.ws.handler.soap.SOAPMessageContext. See http://cxf.apache.org/javadoc/latest/org/apache/cxf/jaxws/context/WrappedMessageContext.html

--
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


More information about the jboss-jira mailing list