I have made a WCF service(service1.svc) have 2 methods.
1.GetData()
2.ProductDetails(string ProdId)
Both returns a file in JSON format when i do this.
http://192.x.x.x/Demo/Service1.svc/GetData
http://192.x.x.x/Demo/Service1.svc/ProductDetails?prodId=P2
now i want to use these methods in Iphone.
& i call them as-
NSDictionary *arrayDict=[[NSDictionary alloc]init];
NSString *requestString = [NSString stringWithFormat:@"%@", [arrayDict JSONFragment], nil];
NSData *requestData = [NSData dataWithBytes: [requestString UTF8String] length: [requestString length]];
NSString *url = [NSString stringWithFormat:@"http://192.x.x.x/Demo/Service1.svc/ProductDetails/prodId=%@",@"P2"];
NSLog(@"URL %@",url);
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:url]];
NSString *postLength = [NSString stringWithFormat:@"%d", [requestData length]];
[request setHTTPMethod: @"POST"];
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody: requestData];
theConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
SO please tell me how to call this method[ProductDetails(string ProdId)] in Iphone