如何使用KSOAP故障消息

| 我正在使用适用于Android的KSOAP2调用基于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>
如何将\“ [名称]不退出\”错误转发给应用程序?     
已邀请:
Envelope.getResponse将抛出一个SoapFault异常,您可以捕获该异常,然后使用getMessage进行烤面包或进行任何操作。     

要回复问题请先登录注册