I am using two web services in my code. and calling methods on tap of alert button My Code is
(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if(buttonIndex==1) { if(alertView==AlertDel) {
[self DeleteFromServerDatabase];} } } -(void)DeleteFromServerDatabase {[loading setFrame:CGRectMake(140, 210, 40, 40)]; [loading setHidden:NO]; [loader setHidden:NO]; [self.view bringSubviewToFront:loader]; [self.view bringSubviewToFront:loading]; [loading startAnimating]; NSString *devToken=app.iDevice; // NSString *devToken= [[UIDevice currentDevice] uniqueIdentifier]; if(devToken) {
} else devToken=@"c677"; NSString *soapMessage = [NSString stringWithFormat: @"\n" "\n" "\n" "\n" "%@\n" "%@\n" "%@\n" "\n" "\n" "\n",bday.fname,bday.lname,devToken ];
NSURL *url = [NSURL URLWithString:@"http://72.167.96.135:8101/BirthDayWebService.asmx"]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url]; NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMessage length]]; [theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; [theRequest addValue: @"http://tempuri.org/DeleteBirthday" forHTTPHeaderField:@"SOAPAction"]; [theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"]; [theRequest setHTTPMethod:@"POST"]; [theRequest setHTTPBody: [soapMessage dataUsingEncoding:NSUTF8StringEncoding]]; theConnection2 = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if( theConnection2 ) { webData = [[NSMutableData data] retain]; } else { }} but any of UrlConnection delegates are not getting called. Please help me out of this