[
https://issues.jboss.org/browse/AS7-4201?page=com.atlassian.jira.plugin.s...
]
Alessio Soldano edited comment on AS7-4201 at 10/17/12 3:01 AM:
----------------------------------------------------------------
OK, this explains the "issue". You're assuming the message context is a
SOAPMessageContext in the ws endpoints, which is not granted. That's granted in
SOAPHandler instances instead, as per my former message.
This said, I believe you have better approaches here;
http://cxf.apache.org/faq.html#FAQ-HowcanIaddsoapheaderstotherequest%2Fre...
summarizes your options very well. Basically either you do what you're currently
doing, but in a SOAPHandler, or you go the standard approach and use
@WebParam(header=true) and add the header to the contract.
was (Author: asoldano):
OK, this explain the "issue". You're assuming the message context is a
SOAPMessageContext in the ws endpoints, which is not granted. That's granted in
SOAPHandler instances instead, as per my former message.
This said, I believe you have better approaches here;
http://cxf.apache.org/faq.html#FAQ-HowcanIaddsoapheaderstotherequest%2Fre...
summarizes your options very well. Basically either your do what you're currently
doing, but in a SOAPHandler, or you go the standard approach and use
@WebParam(header=true) and add the header to the contract.
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/Wrapped...
--
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