I want to get the responseObject. I tried ASI but people offer me to try AFNetworking.But I keep getting error. Where am I doing wrong?With SOAPUI I can get the results. Thank you.
The method in wcf:
ListHastaAra(int kat,int oda,string hastaAdi,int protokolNo,int yatanAyaktan);
the url that I use "http://... /rest /HastaAra" IOS part:
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
NSDictionary *params = @{@"kat": @"0",@"oda": @"0", @"hastaAdi":hastaAdi, @"protokolNo":@"0",@"yatanAyaktan":@"1"};
[manager POST:HASTAARAIP parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"JSON: %@", responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
The error log is:
Error: Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x8c47a30 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}