我正在使用 KSOAP2 for Android 调用基于 Java 的 Web 服务,我想知道如何使用 KSOAP 故障消息。
例如:响应转储看起来像这样:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body><soap:Fault>
<faultcode>soap:Server</faultcode><faultstring>SQL Error</faultstring>
<detail>
<ns2:SQLException xmlns:ns2="http://...">
<SQLError>[PreferenceException]Error compiling sql-expression==============================Column : [NAME] doesn't exist</SQLError>
<ErrorCode>0</ErrorCode>
</ns2:SQLException>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
如何将“[Name] 不退出”错误转发给应用程序?