blueghost56 / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

org.ksoap2.serialization.SoapSerializationEnvelope.getResponse() throws a ClassCastException #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call a WS that returns a single-element string response
2. Try to get the response with getResponse()

What is the expected output? What do you see instead?
Object expected. 

What version of the product are you using? On what operating system?
I'm using version 2.3 on debian

Please provide any additional information below.
I got the problem on the code, the solution is as easy as to do a
instanceof check and don't try to do the KvmSerializable cast. I've found
this on my first steps with WS creation and connection. Hope it helps ;)

Original issue reported on code.google.com by Xose.Ra...@gmail.com on 16 Nov 2009 at 6:56

GoogleCodeExporter commented 9 years ago
I am also getting this error.How to resolve this?

Original comment by jackshih...@gmail.com on 22 Feb 2010 at 6:27

GoogleCodeExporter commented 9 years ago
I used a workaround, I get the bodyIn attribute directly as an Object and then 
try
with instanceof to see what I'm getting. I'm not very proud of this piece of 
code,
but it works.

Original comment by Xose.Ra...@gmail.com on 22 Feb 2010 at 7:09

GoogleCodeExporter commented 9 years ago
Please attach a testcase that reproduces this problem.  A SOAP response that 
causes
this problem and the associated CCE stack trace would be sufficient.

Original comment by karl.mic...@gmail.com on 14 Mar 2010 at 6:06

GoogleCodeExporter commented 9 years ago
The workaround proposed by just getting response as an object and then either 
getting it as SoapPrimitive or SoapObject (= KvmSerializable) is fine imho. If 
you want this changed please provide a patch .. 

Original comment by mosa...@gmail.com on 12 Oct 2010 at 5:36

GoogleCodeExporter commented 9 years ago
i need to get live tennis scroe in my android tennnis score application which 
am doing now... i try to get  the score by using json web service... but no 
data is coming can any one help me...

Original comment by linda...@gmail.com on 17 Dec 2011 at 6:32