File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes JAX-RPC stub problem classcastexception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAX-RPC stub problem classcastexception" Watch "JAX-RPC stub problem classcastexception" New topic

JAX-RPC stub problem classcastexception

Ignacio Vazquez

Joined: Mar 26, 2012
Posts: 5
Hi, i have an old application that use a stub to call rpc based webservice in a batch process, and when calls the send method it's give me that..

class java.lang.ClassCastException: null

at com.sun.xml.rpc.client.StubBase._postSendingHook(

at com.sun.xml.rpc.client.StreamingSender._send(

at com.intelap.macropago.sei.MacroPago_Stub.consultarServiciosHabilitados(

i've searched in the web, and the people who has this error , has different than null in the message of the toString of exception, the mine is null so i dont know what to do
i try putting this property

after the main call, but it doesn't work.
the jre im using is 1.4.2.


Ignacio Vazquez

Joined: Mar 26, 2012
Posts: 5
Hi , i figured out..

I put this property
System.setProperty("javax.xml.soap.MessageFactory", "com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");

It seems that it was using org.apache.axis.Message instead of saaj implementation

Hope it helps!
I agree. Here's the link:
subject: JAX-RPC stub problem classcastexception
It's not a secret anymore!