Error I am getting:
*[NSURLError object]: unrecognized selector sent to instance 0x5f510e0 *
2010-10-11 11:41:33.718 CBH[15454:207] ** Terminating app due to uncaught exception *'NSInvalidArgumentException', reason: '-[NSURLError object]: unrecognized selector sent to instance 0x5f510e0' *
here is the code:
NSArray *args = [NSArray arrayWithObjects:@"username",@"password",nil]; // the param(s)
NSString *server = @"https://username:password@webservices.****.***:443/dsa/xmlrpc/restricted1/"; // the server
XMLRPCRequest *request = [[XMLRPCRequest alloc] initWithHost:[NSURL URLWithString:server]];
[request setMethod:@"BootService.getPublicTokenGeneric" withObject:args];
id response = [self executeXMLRPCRequest:request];
[request release];
if( [response isKindOfClass:[NSError class]] ) {
NSLog(@"Error : %@",response);
}
else {
NSLog(@"Response ");
}
}
- (id)executeXMLRPCRequest:(XMLRPCRequest *)req {
NSLog(@"HEllo");
XMLRPCResponse *userInfoResponse = [XMLRPCConnection sendSynchronousXMLRPCRequest:req];
if([userInfoResponse isKindOfClass:[NSError class]]) {
NSLog(@"Error %@",userInfoResponse);
}
return [userInfoResponse object];
}
Could some one help me tearing out this error!!
I edited the code and now I can see NSURLError is:
Domain=NSURLErrorDomain Code=-1005 "The network connection was lost."
NSErrorFailingURLStringKey=http://username:password@..org:443/zws/xmlrpc/restricted1/, NSErrorFailingURLKey=http://username:password@..org:443/zws/xmlrpc/restricted1/,
NSLocalizedDescription=The network connection was lost., NSUnderlyingError=0x5f2b300 "The network connection was lost.