1 Reply Latest reply on Oct 14, 2007 4:42 AM by Alessio Soldano

    ClassCastException @ BaseDeserializerFactory.getSpecialized

    Randall Vasquez Newbie

      Using Jboss 4.0.2.
      Have a web service client(dyamic proxy method) that uses a complex type as a return parameter which consists of two java Object (WSDL anyType ).
      The web service and client both worked until there was an attempt to add security to the application which housed the ejb endpoint.

      The following code was added to the dynamic proxy client in order to get it to send a username and password.

      Stub stub = (Stub)myService;
      stub._setProperty(Stub.USERNAME_PROPERTY,username);
      stub._setProperty(Stub.PASSWORD_PROPERTY,password);
      myResult = myService.runServiceMethod(x,y,z);


      This seems to get past the authentication issue but is now throwing the following exception
      Exception:java.rmi.RemoteException: null; nested exception is:
      java.lang.ClassCastException,Stack:java.rmi.RemoteException: null; nested exception is:
      java.lang.ClassCastException
      at org.jboss.webservice.client.PortProxy.invoke(PortProxy.java:176)
      at $Proxy1.runJob(Unknown Source)
      ...
      ...
      Caused by: java.lang.ClassCastException
      at org.jboss.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:200)
      at org.jboss.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:118)
      at org.jboss.axis.encoding.DeserializationContextImpl.getDeserializer(DeserializationContextImpl.java:574)
      at org.jboss.axis.message.RPCHandler.onStartChild(RPCHandler.java:309)
      at org.jboss.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1168)
      at org.jboss.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:244)
      at org.jboss.axis.message.SOAPElementAxisImpl.publishToHandler(SOAPElementAxisImpl.java:1386)
      at org.jboss.axis.message.RPCElement.deserialize(RPCElement.java:262)
      at org.jboss.axis.message.RPCElement.getParams(RPCElement.java:396)
      at org.jboss.axis.client.Call.invoke(Call.java:2662)
      at org.jboss.axis.client.Call.invoke(Call.java:2538)
      at org.jboss.axis.client.Call.invokeInternal(Call.java:1976)
      at org.jboss.axis.client.Call.invoke(Call.java:1914)
      at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265)
      at org.jboss.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:381)
      at $Proxy0.runJob(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.webservice.client.PortProxy.invoke(PortProxy.java:105)
      ... 4 more


      it seems we are getting a result back but are having an issue deserializing the response.

      Has anyone had a similar experience ?
      can anyone provide some insight ?
      Thanks.

        • 1. Re: ClassCastException @ BaseDeserializerFactory.getSpeciali
          Alessio Soldano Master

          Sorry, can't remember of it; moreover as you said, setting the username/pwd into the stub should not cause this.
          If migrating to a more recent jboss application server and ws stack is not affordable for you, in order to understand what's happening I would suggest you to capture the soap messages being exchanged. This way you might see what is really changing and that could drive you to understand where is the problem.
          If you still think there's a bug, you can nevertheless create a minimal application reproducing the problem and attach it to a new jira issue, however keep in mind that the team is putting his main effort into the jaxws development, thus your potential issue might have to be handled by the community.