如何在Android上处理SOAP方法异常
我将请求发送到web服务,但得到以下异常。我如何解决这个问题如何在Android上处理SOAP方法异常,android,ksoap,Android,Ksoap,我将请求发送到web服务,但得到以下异常。我如何解决这个问题 02-27 17:09:43.169: INFO/System.out(7904): Soap Method Error ->SoapFault - faultcode: 'soap:Server' faultstring: 'Server was unable to process request. ---> Object reference not set to an instance of an obj
02-27 17:09:43.169: INFO/System.out(7904): Soap Method Error
->SoapFault - faultcode: 'soap:Server' faultstring:
'Server was unable to process request. ---> Object reference not set to
an instance of an object.' faultactor: 'null' detail:
org.kxml2.kdom.Node@405b9a28
代码:
您可以捕获以下异常
catch(SoapFault sf){
//Do something upon a SOAP exception
}
它为什么会出现?原因是什么?通过这样做,您可以捕获soap异常并进行自定义处理,比如向用户显示错误对话框窗口
catch(SoapFault sf){
//Do something upon a SOAP exception
}