- (void)viewDidLoad
{
binding.logXMLInOut = YES; // to get logging to the console.
StationDetailsJsonSvc_getAvailableStations *request = [[StationDetailsJsonSvc_getAvailableStations new] autorelease];
request.userName=@"twinkle";
request.password=@"twinkle";
StationDetailsJsonSoap11BindingResponse *resp = [binding getAvailableStationsUsingParameters:request];
for (id mine in resp.bodyParts)
{
if ([mine isKindOfClass:[StationDetailsJsonSvc_getAvailableStationsResponse class]])
{
resultsring = [mine return_];
NSLog(@"list string is%@",resultsring);
}
}
#pragma mark parsing
SBJsonParser *parserq = [[SBJsonParser alloc] init];
//if successful, i can have a look inside parsedJSON - its worked as an NSdictionary and NSArray
results= [parserq objectWithString:resultsring error:nil];
NSLog(@"print %@",results);
for (status in results)
{
NSLog(@"%@ ",[status objectForKey:@"1" ]);
events=[status objectForKey:@"1"];
NSLog(@"get%@",events);
NSLog(@"events%@",events);
}
events=[status objectForKey:@"1"];
NSLog(@"post%@",events);
self.navigationController.navigationBarHidden=YES;
[whethertableview reloadData];
[super viewDidLoad];
}
これは私のコードで、アプリを実行するとテーブルビューのコンテンツが取得されず、[NSCFString count]:unrecognized セレクターがインスタンスに送信されてクラッシュする