I was working on a migration form Jboss5 using Metro to a Jboss6.1 using the JbossWS-CXF3.4 stack which comes with Jboss.
When I run my application, I have this error :
Cannot be cast to com.sun.xml.ws.developer.WSBindingProvider
In fact, I have a code, where the Webservice Port was cast to com.sun.xml.internal.ws.developer.WSBindingProvider
WSBindingProvider bp = (WSBindingProvider) webServicePort;
This cast works before with Metro as we use the Sun reference implementation of JAX-WS. As Jboss6.1 comes with CXF stack for web Service, this cast should be adjusted by using javax.xml.ws.BindingProvider.
So the code becomes :
BindingProvider bp = (BindingProvider) webServicePort;
Hope it helps you :)
When I run my application, I have this error :
Cannot be cast to com.sun.xml.ws.developer.WSBindingProvider
In fact, I have a code, where the Webservice Port was cast to com.sun.xml.internal.ws.developer.WSBindingProvider
WSBindingProvider bp = (WSBindingProvider) webServicePort;
This cast works before with Metro as we use the Sun reference implementation of JAX-WS. As Jboss6.1 comes with CXF stack for web Service, this cast should be adjusted by using javax.xml.ws.BindingProvider.
So the code becomes :
BindingProvider bp = (BindingProvider) webServicePort;
Hope it helps you :)
No comments :
Post a Comment