我正在使用 Objective-C ,而使用 XMLRPC 进行Web服务。
你能帮我吗?我如何处理以下错误并向用户显示正确的错误信息。
以字符串格式从XMLRPC收到此错误。
myString:
let todos = [
{todoText: 'Foo', completed: false},
{todoText: 'Bar', completed: false},
];
console.log('if `i` equals 0 then the output of `todos[i]` is:')
var i = 0;
console.log(todos[i]);
console.log('if you want to get the `todoText` value for this entry then the value of `todos[i].todoText` is:')
console.log(todos[i].todoText);
现在我正在使用WPXMLRPC https://github.com/wordpress-mobile/wpxmlrpc
我无法处理这是字符串
<?xml version='1.0'?>
<methodResponse>
<fault>
<value><struct>
<member>
<name>faultCode</name>
<value><int>4</int></value>
</member>
<member>
<name>faultString</name>
<value><string>(u'Sorry, you are not allowed to access this document. Only users with the following access level are currently allowed to do that:\n- Administration/Settings\n\n(Document model: ir.module.module)', None)</string></value>
</member>
</struct></value>
</fault>
</methodResponse>