阻止 Sudzc 生成的 SOAP 请求
我正在开发一个使用 Sudzc 与 SOAP Web 服务交互的应用程序。除了对 SoapRequest.h
进行一些修改以及对对象序列化进行一些更改之外,该服务生成的模板运行良好。
默认情况下,模板提供了使用已创建的方法发送 SOAP 请求的可能性,如下所示:
MyService* service = [MyService service];
[service login:self action:@selector(handleLogin:) user:@"user" password:@"pass"];
请求完成后,控制权将交给处理程序,并由 SOAP 响应返回的值,如下所示:
- (void) handleLogin: (id) value{
//cast value to your object
}
我想知道是是否有可能阻止所发出的请求,而不是强制结束请求。
例如,如果用户从具有 backButton
活动状态的 UINavigationController
发出请求(我知道我可以禁用它,直到请求完成),但是如果用户返回对于前一个控制器,我想阻止活动请求。
我希望它很清楚(如果不是,请告诉我)。
I'm working on an application that uses Sudzc to interface with a SOAP web-service. The templates generated by the service works well, apart some modification SoapRequest.h
, and some changes to the object serialization.
By default, the template offers the possibility to send the SOAP request using a method already created like this:
MyService* service = [MyService service];
[service login:self action:@selector(handleLogin:) user:@"user" password:@"pass"];
Once the request is finished, control is given to the handler with the value returned by the SOAP response like this:
- (void) handleLogin: (id) value{
//cast value to your object
}
What I would like to know is if there is a possibility to block the request made, rather than by force to end the request.
For example, if the user makes a request from a UINavigationController
who has backButton
active (i know i could disable it until the request has been completed), but if the user returns to the previous controller, i would like to block the active request.
I hope it is clear(let me know if it is not).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从服务调用该方法实际上会返回一个 SoapRequest* 对象,您可以使用该对象来管理请求,包括取消请求。例如,您可以这样做...
希望有帮助!
Calling the method from your service actually returns a SoapRequest* object that you can use to manage the request, including canceling it. For instance, you could do this...
Hope that helps!
为什么不在 https://twitter.com/#!/sudzc 上询问他们?
我不知道 Sudzc,但我总是在我的服务中创建一个方法
cancelConnection
,可以从 UINavigationController 中的 dealloc 调用该方法。他们当然也做了同样的事情。祝你好运why not asking them on https://twitter.com/#!/sudzc ?
I don't know Sudzc, but I always create a Method
cancelConnection
in my services that can be called from dealloc in a UINavigationController. They have certainly done the same. Good luck