3 Replies Latest reply on Jan 30, 2006 4:18 PM by chwang

    ClassCastException while using JWSDP 1.6

    amitguz

      I'm tring to write a simple java client which connect to web-service on JBOSS 4. (using jdk 1.5.0) and I'm tring to use the static stub client method.
      (when I wrote the client as Dynamic proxy client all worked fine).

       String endPoint = "http://localhost:8080/listener/DeviceListenerService";
       String nameSpace = "http://com.imagine.GWListener";
       String wsdlPort = "DevicelistenerPort";
       DeviceListenerService_Impl serviceProxy = new DeviceListenerService_Impl();
       Devicelistener_Stub devStub = (Devicelistener_Stub)serviceProxy.getDevicelistenerPort();
       devStub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,endPoint);
       devStub.modulePullOut(3);
       System.out.println("call module pull out by Static stubb client web-service");
      
      


      and I'm receiving the following error:

      Exception in thread "main" java.lang.ClassCastException: org.jboss.axis.Message
       at com.sun.xml.rpc.client.StubBase._postSendingHook(StubBase.java:231)
       at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:324)
       at com.imagine.GWListenerStubs.Devicelistener_Stub.modulePullOut(Devicelistener_Stub.java:70)
       at mainTestWebService.callWebService2(mainTestWebService.java:50)
       at mainTestWebService.main(mainTestWebService.java:24)