aspose file tools*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAX-RPC stub problem classcastexception" Watch "JAX-RPC stub problem classcastexception" New topic
Author

JAX-RPC stub problem classcastexception

Ignacio Vazquez
Greenhorn

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
java.lang.ClassCastException

at com.sun.xml.rpc.client.StubBase._postSendingHook(StubBase.java:231)

at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:324)

at com.intelap.macropago.sei.MacroPago_Stub.consultarServiciosHabilitados(MacroPago_Stub.java:231)


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.

Greetings.

Ignacio Vazquez
Greenhorn

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!
Bye!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAX-RPC stub problem classcastexception