I have written a CXF client to access P6 WS and it works fine from the IDEs. But while I try to integrate with by writing a client program and including jar file from standalone app, it fails and is throwing the
Exception in thread "main" java.lang.ClassCastException: weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler cannot be cast to org.apache.cxf.frontend.ClientProxy
Process exited with exit code 1.
The portal is developed on the Oracle ADF Framework.
Even though the org.apache.cxf jars are present in classpath, it is unable to do the casting and throwing the error. Does anyone who how to resolve this error? Can we override the default class loading that is not allowing the cast to happen? Any help is appreciated!
My code in main method is as below
URL wsdlURL = new URL("http://172.18.90.40:8206/p6ws/services/ProjectService?wsdl");
ProjectService service = new ProjectService(wsdlURL);
ProjectPortType servicePort = service.getProjectPort();
Client client = ClientProxy.getClient(servicePort);