After I call a SOAP webservice asynchronously using WSMethodInvocationSetCallBack and WSMethodInvocationScheduleWithRunLoop I get the result in the following callback function and begin parsing it
void wsCallback(WSMethodInvocationRef invocation, void* info, CFDictionaryRef data)
{
const void *data = CFDictionaryGetValue(resultBody, (NSString *)kWSMethodInvocationResult);
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[target methodSignatureForSelector:sel]];
[invocation setTarget:target];
[invocation setSelector:sel];
// Note: Indexes 0 and 1 correspond to the implicit arguments self and _cmd,
// which are set using setTarget and setSelector.
[invocation setArgument:data atIndex:2];
[invocation invoke];
the invoked selector looks like this:
- (void) result:(void*)data{
NSDictionary *dict = (NSDictionary*)data;
const void *i = [dict objectForKey: @"MethodResult"];
///more stuff
}
on that last line [dict objectForKey...] , I get the unrecognized selector error when clearly it is an NSDictionary. Printing a description of the data pointer just shows NSCFDictionary. Why is this failing?