0

Possible Duplicate:
How to access SOAP services from iPhone

In my application . I want to send a array to web service

Community
  • 1
  • 1

1 Answers1

0

i use this method to parse in soap with different parameters

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];  
GhostRider
  • 1,197
  • 10
  • 19
  • In my app , I used code generated from sudzc.com , here to need pass a array to web service.But I am unable to pass array – rishi L Dec 06 '10 at 10:35