Sudzc iPhone SOAP - 如何使用此库自动生成的数据处理 SOAP 错误?
我有一个响应,如果出现异常,它会返回 SOAP 错误。我想处理这个 SOAP 错误。但是,我通过反序列化 SOAP 响应获得的响应没有 SOAP 错误。
我使用 Sudzc 库为我的 Web 服务生成目标 C 代码。
帮助将不胜感激。
谢谢,
普里亚
I have a response, which returns SOAP fault in case of exception. I want to handle this SOAP Fault. But, the response I get by deserializing the SOAP response does not have a SOAP Fault.
I have used Sudzc Library to generate the objective C code for my web services.
Help will be appreciated.
Thanks,
Priya
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
与 Sudzc 捆绑在一起的 SoapRequest.m 中似乎存在一个错误。
具体来说,如果您查看该
方法并导航到以下代码:
您可以看到,当返回到处理程序时,输出始终为 nil。
要解决此问题,您只需将 SoapFault 而不是输出返回到处理程序,如下所示:
There seems to be a bug in the SoapRequest.m that is bundled with Sudzc.
Specifically, if you take a look at the
method and navigate to the following bit of code:
You can see that output will always be nil when returned to the handler.
To fix this issue, you can simply return the SoapFault instead of the output to your handler like so:
在你的 Sudzc 返回处理程序方法中,你可以 [idOfSoapObject isKindOfClass:[SoapFault class]]
如果你已经这样做了,那么我建议打开日志记录:你的服务将有一个
.logging
(BOOL)财产。这将记录完整的肥皂请求和响应。您可以在此处手动检查响应是否有错误。In your Sudzc return Handler Method, you can [idOfSoapObject isKindOfClass:[SoapFault class]]
If you are already doing this, then I would suggest turning Logging on: your service will have a
.logging
(BOOL) property. This will log the full soap requests and responses. Here you can check the response manually for a fault.