我想要异步执行我的SOAP的Web服务,因为我得到了在获取数据,同时呼吁synchronously.Also我能得到调用时,多个Web服务被称为在一个单一的Web服务时产生一定的滞后性(图做负载)或在(查看会出现)我无法获得的数据。如何调用异步SOAP Web服务?
谁能告诉如何调用一个异步SOAP web服务:这是我的代码
cws = [[CustomWebService alloc]init];
NSString *soapMessage = [NSString stringWithFormat:@"my soap string"];
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(msgCount) name:@"my response name" object:nil];
NSDictionary *Details=[[NSDictionary alloc]initWithObjectsAndKeys:nil];
[cws getSoapAction:@".........." andNameSpace:@"" andDetails:Details andUrlIs:[AppDelegate URLSource] andSoapMessage:soapMessage ];
[cws getPageName:@"my response name"];
NSLog(@"SOAP MESSAGE IS %@",soapMessage);
而且我在这里得到了响应:
-(void)msgCount
{
[[NSNotificationCenter defaultCenter]removeObserver:self];
NSMutableDictionary *diict=[[NSMutableDictionary alloc]initWithDictionary:[cws msgCount]];
NSLog(@"the response is %@",diict);
}
ü可以使用afnetwork或asihttp或的NSURLRequest – vaibby
vaibby坦克我会尝试。 – Arun
哪一个你想要? – vaibby