My suggestion when using CXF in J2EE app servers would be to NOT use the generated Service class to create the proxy and instead use the JaxWsProxyFactoryBean. It's really not hard to use and would pretty much make sure that CXF is completely picked up instead of whatever the App server decides you should use.
Dan On Thursday 14 April 2011 11:50:19 PM nick wrote: > My code and exception is almost identical as yours. > I am trying to create client using CXF(2.2.10) client front end in WAS 7.0. > The code works just fine in WAS 6.1. > > Client client = ClientProxy.getClient(soapPort) > HTTPConduit http = (HTTPConduit) client.getConduit(); > > I have same exception as yours > java.lang.ClassCastException: > org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler incompatible with > org.apache.cxf.frontend.ClientProxy > org.apache.cxf.frontend.ClientProxy.getClient(ClientProxy.java:93) > > We know the WAS7.0 restricts the usage of application modules that use > both IBM's JAX-WS and external JAX-WS (CXF in this case). So we know it's > class loading module. > I've tried using 'DisableIBMJAXWSEngine' properties and > 'Ignore-Scanning-Archieves' (so the server not to scan > org.apache.axis2.jar from the WAS 7.0 plugins). > I've also tried to change class loader order to 'parent last' on server > lever and web module (.war). > > I still get same exception. Really appreciate your help. > > > > > > > > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/CXF-client-and-WAS-7-issue-classcast-excep > tion-tp4258948p4304711.html Sent from the cxf-issues mailing list archive > at Nabble.com. -- Daniel Kulp dk...@apache.org http://dankulp.com/blog Talend - http://www.talend.com