I m facing a rather strange Issue when trying to load data from an XML-Webservice.
The webservice allows me to pass separated identifiers within the URL-Request.
It is therefore possible for the URL to become rather long (>240 characters).
If I open said URL in firefox the response arrives as planned, if I execute the following code xmlData
remains empty.
NSString *baseUrl = [[NSString alloc] initWithString:[[[[kSearchDateTimeRequestTV stringByReplacingOccurrencesOfString:@"{LANG}" withString:appLanguageCode]
stringByReplacingOccurrencesOfString:@"{IDENTIFIERS}" withString:myIdentifiers]
stringByReplacingOccurrencesOfString:@"{STARTTICKS}" withString:[NSString stringWithFormat:@"%@", [[startTime getTicks] descriptionWithLocale:nil]]]
stringByReplacingOccurrencesOfString:@"{ENDTICKS}" withString:[NSString stringWithFormat:@"%@", [[endTime getTicks] descriptionWithLocale:nil]]]];
NSLog(baseUrl); //looks good, if openend in browser, returnvalue is ok
urlRequest = [NSURL URLWithString:baseUrl];
NSString *xmlData = [NSString stringWithContentsOfURL:urlRequest encoding:NSUTF8StringEncoding error:&err]; //err is nil, therefore i guess everything must be ok... :(
NSLog(xmlData); //nothing...
是否有任何限制,对你们任何人来说是否也存在同样的问题? 什么是好的工作?
感谢您的帮助
萨姆