I'm trying to pull out the details of a fault a call is returning.
Here is the response
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/
envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>SessionFault_FaultMessageException</faultstring>
<detail>
<ns1:SessionFault xmlns:ns1="
http://test.testing123.com/service/
data">
<ns1:Operation>0</ns1:Operation>
<ns1:Reason>Error</ns1:Reason>
<ns1:Message>Invalid Data</ns1:Message>
</ns1:SessionFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Here is the code that's parsing the data after the call:
...if ([mine isKindOfClass:[SOAPFault class]])
{
SOAPFault *f = mine;
NSLog(@"it's a fault: code:%@; string:%@; actor:%@; detail:%@",
f.faultcode, f.faultstring, f.faultactor, f.detail);
NSLog(@"sfs: %@", f.simpleFaultString);
}
The console log shows:
2010-06-14 12:41:54.684 Test[19207:207] it's a fault:
code:soapenv:Client; string:SessionFault_FaultMessageException; actor:
(null); detail:(null)
2010-06-14 12:41:54.685 Test[19207:207] sfs:
SessionFault_FaultMessageException
I would've expected "detail:(null)" to show the xml within the
<detail> tags. Do you see any reason why it isn't?
Regards,
Brian