iPhone で特定の URL から簡単な XML 呼び出しを行いたいのですが、呼び出し時に毎回更新された結果が得られないため、既に URL をチェックインしましたが、実際の結果が得られません。
聞くのは.mコントローラーコードです
//This is SOAP calling
NSString *postString = @"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n"
"<soap:Body>\n"
"<GetCountries xmlns=\"http://www.webserviceX.NET\"/>\n"
"</soap:Body>\n"
"</soap:Envelope>";
//this is calling from URL wia above SOAP
dataWebService = [[NSMutableData data] retain];
NSURL *tempURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.webservicex.net/country.asmx"]];
NSMutableURLRequest *request = [[NSMutableURLRequest requestWithURL:tempURL] retain];
NSString *postLength = [NSString stringWithFormat:@"%d", [postString length]];
[request addValue:@"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
[request addValue:@"http://www.webserviceX.NET/GetCountries" forHTTPHeaderField:@"SOAPAction"];
[request addValue:postLength forHTTPHeaderField:@"Content-Length"];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]];
NSURLConnection * myConnection = [NSURLConnection connectionWithRequest:request delegate:self];
[myConnection start];
NSLog(@"%@Testing ",myConnection);
[request release];
前もって感謝します