0 Replies Latest reply: Jan 30, 2013 2:46 AM by User578640 RSS

    ClassCastException while trying to call P6 WS from ADF deploying CXF client

    User578640
      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
      at org.apache.cxf.frontend.ClientProxy.getClient(ClientProxy.java:93)
      at com.boa.bes.client.WSClient.Setup(WSClient.java:87)
      at com.boa.bes.client.WSClient.main(WSClient.java:223)
      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);