Possible en double:
How to access SOAP services from iPhoneComment envoyer un tableau de savon en tant que paramètre à un objectif de service Web C
Dans ma demande. Je veux envoyer un tableau à un service Web
Possible en double:
How to access SOAP services from iPhoneComment envoyer un tableau de savon en tant que paramètre à un objectif de service Web C
Dans ma demande. Je veux envoyer un tableau à un service Web
i utiliser cette méthode pour analyser dans le savon avec des paramètres différents
NSString * SoapMessage = [NSString stringWithFormat: @ "" "" "" "" " % @ " "% @ " " " " " " ", [clientRefString valueForKey: @" Type "], [clientRefString valueForKey: @" feeEarner "]]; // NSLog (@ "soapMessage:% @", soapMessage);
//NSString *body = [[NSString alloc]initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"GetSearchMatter" ofType:@"txt"],@"OMI",@"SPA005"];
////NSLog(@"%@",body);
NSURL *serviceURL = [[NSURL alloc] initWithString:@"http://82.110.35.93/oneoffice.asmx?op=SearchCosts"];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:serviceURL];
[request setHTTPMethod:@"POST"];
[request setValue:@"text/xml" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:[soapMessage dataUsingEncoding:NSUTF8StringEncoding]];
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString *dataStr = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
[dataStr release];
[serviceURL release];
[request release];
//[body release];
if(xmlParser)
{
[xmlParser release];
xmlParser = nil;
}
xmlParser = [[NSXMLParser alloc] initWithData:data];
[xmlParser setDelegate:self];
[xmlParser parse];
Dans mon application, j'ai utilisé du code généré à partir de sudzc.com, ici pour passer un tableau à un service Web. Mais je ne peux pas transmettre de tableau –