JBOSS EAP 6.3 and CXF java.lang.ClassCastException: org.apache.cxf.jaxws.context.WrappedMessageContext

Latest response

Hello all,

I am having an issue with getting the wrapped message context from inside my cxf webservice. I inject the WebServiceContext as a resource to my service but when I try and cast it to a WrappedMessagecontext I get the following error:

java.lang.ClassCastException: org.apache.cxf.jaxws.context.WrappedMessageContext cannot be cast to org.apache.cxf.jaxws.context.WrappedMessageContext

My deployment structure is and EAR that has 2 WARs inside of it.

My jboss-deployment-structure has the following modules:

"org.springframework.spring" export="true"
"org.apache.cxf" export="true"
"javax.xml.ws.api" export="true"
"org.jboss.osgi.framework" export="true"

And my wars both contain:

cdi-api-1.0-SP4.jar
commons-codec-1.7.jar
commons-io-2.2.jar
cxf-bundle-2.7.6.jar
cxf-rt-transports-http-2.7.11.redhat-3.jar
javax.inject-1.jar
jboss-logging-3.1.3.GA.jar
neethi-3.0.2.jar
stax2-api-3.1.3.jar
wsdl4j-1.6.3.jar
xmlschema-core-2.0.3.jar

Thank You

Responses