Hi,
I have an error when calling a .NET webservice from objective c
This is my code:
-(IBAction)buttonClicked:(id)sender {
NSString *postString =[NSString stringWithFormat:question];
NSLog(postString);
NSURL *url = [NSURL URLWithString: address+@"?op=execute"];
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url];
NSString *msgLength = [NSString stringWithFormat:@"%d", [postString length]];
[req addValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[req addValue:msgLength forHTTPHeaderField:@"Content-Length"];
[req setHTTPMethod:@"POST"];
[req setHTTPBody: [postString dataUsingEncoding:NSUTF8StringEncoding]];
[activityIndicator startAnimating];
conn = [[NSURLConnection alloc] initWithRequest:req delegate:self];
if (conn) {
webData = [[NSMutableData data] retain];
}
}
and i get back this error:
2010-08-20 14:37:43.889 tester[757:207] soap:ReceiverServer was unable to process request. ---> '>' is an unexpected token. The expected token is '"' or '''. Line 1, position 20.