I am getting a java.lang.ClassCastException in my code. In my portal service, I have an JSPDynPage component, which exposes one of my external web service's public methods. When I test this JSPDynPage component, I am not getting any complications and results are returned as expected.
I then tried to create a new Portal Application, which will use the above portal service. In my Portal Application's component, I am calling the service with the following statement
com.WebService.IWS client = (com.WebService.IWS)PortalRuntime.getRuntimeResources().getService(IWS.KEY);
This statement is identical to the statement I used in my portal service's JSPDynPage component. However, when I test the Portal Application's component, I get a java.lang.ClassCastException. The project was built successfully. There were no complications in compiling and deploying the PAR file. I have also verified that the Portal Service has been started. I just do not understand why there would be a ClassCastException since the Portal Service's own JSPDynPage component is working.