【发布时间】:2017-08-16 10:47:01
【问题描述】:
我正在研究 Objective-C 和 Web 服务使用 XMLRPC。
你能帮我如何处理以下错误并向用户显示正确的错误消息。
从 XMLRPC 以字符串格式收到此错误。
我的字符串:
<?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>
更新:
现在我正在使用 WPXMLRPC https://github.com/wordpress-mobile/wpxmlrpc
我无法处理这是字符串
(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)
【问题讨论】:
标签: ios objective-c iphone xml-rpc