이 비누 결함의 "세부 사항"안에 값을 가져 오려고하는데, 그렇게하는 방법을 찾지 못했습니다.soapfault의 세부 사항을 분석하는 방법은 무엇입니까?
서버의 응답 :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>Many Errors</faultstring>
<detail>
<error_id>2</error_id>
<errors>
<error>
<error_id>1</error_id>
<error_description>Unknown Error</error_description>
</error>
<error>
<error_id>5</error_id>
<error_description>Not Authorized</error_description>
</error>
<error>
<error_id>9</error_id>
<error_description>Password should be at least 6 characters including one letter and one number</error_description>
</error>
</errors>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I는 해당 error_description
들과 함께 error_id
의를 얻을 필요가있다. 지금까지 나는 단지 다음과 같은 방법으로 kSOAP를 통해 detail
를 얻을 관리했습니다 :
if (envelope.bodyIn instanceof SoapObject) {
return envelope.bodyIn.toString();
} else if (envelope.bodyIn instanceof SoapFault) {
SoapFault e = (SoapFault) envelope.bodyIn;
Node details = ((SoapFault) envelope.bodyIn).detail;
}
하지만 난 그것을 통해 "탐색"할 때 나는 내가 필요로하는 단일 값을 얻을 수 있었다하지 않았습니다.
도움을 주시면 대단히 감사하겠습니다. ksoap2 온라인으로 비누 결함 처리에 관한 정보는 거의 찾아 내지 못했습니다 ...