This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes ClassCastException for SOAP message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "ClassCastException for SOAP message" Watch "ClassCastException for SOAP message" New topic
Author

ClassCastException for SOAP message

Vinod Awar
Ranch Hand

Joined: Nov 06, 2006
Posts: 125
Hii i have a java client which connects to our webservices.when i run this i get a ClassCastException here is the stack trace.



i have new saaj.jar,saaj-api.jar, and saaj-impl.jar in path. And iam using jre 1.6.

Any ideas on how to resolve this ?

Thanks,

Vinod


The biggest bankruptcy is the loss of enthusiasm
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41132
    
  45
i have new saaj.jar,saaj-api.jar, and saaj-impl.jar in path.

This sounds fishy. First of all, I'm assuming you have those in the classpath, not the path (where they wouldn't do any good). Secondly, I think Java 1.6 comes with SAAJ, so if you want to use a different version than the one built in, just adding them to the classpath will cause confusion.

You need to put these classes in the bootclasspath; this is discussed in more detail here.


Ping & DNS - my free Android networking tools app
Vinod Awar
Ranch Hand

Joined: Nov 06, 2006
Posts: 125
Sorry for the confusion. I put those jars in \Java\jre1.6.0_01\lib\ext folder.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41132
    
  45
I put those jars in \Java\jre1.6.0_01\lib\ext folder.


That won't do. They need to be in the bootclasspath.
Vinod Awar
Ranch Hand

Joined: Nov 06, 2006
Posts: 125
i tried -bootclasspath. but its not working

David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

try c:\progra~1\etc rather than "Program Files", the space will cause you issues.
Vinod Awar
Ranch Hand

Joined: Nov 06, 2006
Posts: 125
Thanks Ulf and David, i replaced the older saaj-api.jar and saaj-impl.jar with new jars. And this solved the issue.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

I'm glad you got it working, and thanks for taking the time to update us!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ClassCastException for SOAP message
 
Similar Threads
Mixing Generics and Legacy code question
[SOAP-ENV:Envelope: null]
Mixing of code - raw and generic
To attach xml document to soap body using saaj api.
Confusion of java web services implementation terminology