我的應用程序在以前的iOS版本上正常工作。我剛剛升級到iOS6,現在應用程序在處理XML請求/響應時返回錯誤。ASIHTTPClasses和iOS6
應用程序向服務器發送XML請求並接收XML響應,但現在響應爲空「<>」導致NSXMLParser失敗。
這裏是應用程序是如何發送請求(在此使用的工作,事先iOS6的):
[request setURL:[NSURL URLWithString:url]];
[request setHTTPMethod:@"POST"];
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];
[request setValue:@"text/xml" forHTTPHeaderField:@"Content-Type"];
//[request setValue:@"application/x-www-form-urlencoded charset=utf-8" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:postData];
NSURLConnection *conn=[[NSURLConnection alloc] initWithRequest:request delegate:self];
if (conn)
{
receivedData = [[NSMutableData data] retain];
}
但現在的響應是空「<>」。
parser error is Error Domain=NSXMLParserErrorDomain Code=9 "The operation couldn’t be completed. (NSXMLParserErrorDomain error 9.)", path to file is :
/Users/ronluna/Library/Application Support/iPhone Simulator/6.0/Applications/5BA74D89-1967-4B9E-A1C0-B076F7BB9064/Documents/Menus.xml
任何想法可能是什麼問題?