Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org.ksoap2.SoapFault cannot be cast to org.ksoap2.serialization.SoapObject #177

Open
GoogleCodeExporter opened this issue Jul 9, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

SoapSerializationEnvelope envelope = new 
SoapSerializationEnvelope(SoapEnvelope.VER10);  

envelope.bodyOut = rpc;  
envelope.dotNet = true;  
envelope.setOutputSoapObject(rpc);  
HttpTransportSE transport = new HttpTransportSE(URL);       

try {  
    transport.call(soapAction, envelope);  
} catch (Exception e) {  
    e.printStackTrace();  
} 

SoapObject object = (SoapObject) envelope.bodyIn; 

the error is in the last sentence: 
AndroidRuntime(16615): java.lang.ClassCastException: org.ksoap2.SoapFault 
cannot be cast to org.ksoap2.serialization.SoapObject

how to solve it ? please.

btw, i use ksoap2-android V3.1.0


Original issue reported on code.google.com by [email protected] on 20 Nov 2013 at 1:59

@GoogleCodeExporter
Copy link
Author

I think the service is returning an exception. You must cast to SoapFault to 
see the error

if (envelope.bodyIn instanceof SoapFault)
{
    final SoapFault sf = (SoapFault) envelope.bodyIn;
    ... // Stuff
}

Original comment by [email protected] on 27 Jan 2015 at 4:35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant