calling web services
NSURLRequest *request1 = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://97.74.198.63:8080/psa-1.0/locateProduct.do?subCatId=661"]];
[[NSURLConnection alloc] initWithRequest:request1 delegate:self];
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
NSLog(@"Received Response");
}
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
NSLog(@"Received Data");
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
NSLog(@"Connection Error");
// Show error
}
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
// Once this method is invoked, "responseData" contains the complete result
}
No comments:
Post a Comment