Caused By:java.lang.ClassCastException:org.ksoap2.SoapFault cannot is cast to Org.ksoap2.serialization.SoapObject
It bothered me for a long time to report such a similar mistake. The occasional newspaper is not always reported.
It turns out to be a little less judgmental, because the server is not necessarily the result we want to return each time.
See figure
Puzzled for a long time, finally in the StackOverflow inside only to find the answer.
Probably is the server abnormal time will cause this, no wonder my program will crash some time, such as a place should be passed an int type, the client side is not detected strictly, and then directly to the interface to go, this time the server side if not do detection, such as direct int.parse ("string"), Error or extreme point, the interface of the database account password deliberately dropped will trigger this exception.
A headache for a long time this problem
Incidentally, KSOAP2, can set the timeout, see a lot of other people's code is not set time-out, once the server gives the results longer, it will be abnormal. So let's set a time-out. Can't stand the program with the use of the crash ...
About Android using KSOAP2 caused By:java.lang.ClassCastException:org.ksoap2.SoapFault cannot is cast to Org.ksoap2.serialization.SoapObject