In my project i have implemented multiple service and getting response. Among that one WSDL service that returns one data set as a response,
+ (id)deserializeAsDictionary:(CXMLNode*)element {
NSLog(@"deserializeAsDictionary = %@, children: %d", element.stringValue, [element childCount]);
if([element childCount] == 1) {
CXMLNode* child = [[element children] objectAtIndex:0];
if([child kind] == CXMLTextKind) {
NSLog(@"child %@ added", [child stringValue]);
return [[[element children] objectAtIndex:0] stringValue];
}
}
NSMutableDictionary* d = [NSMutableDictionary dictionary];
NSInteger i = 1;
NSString *objKey;
for(CXMLNode* child in [element children]) {
id v = [Soap deserialize:child];
if(v == nil) {
v = [NSNull null];
} else {
if([[child name] isEqualToString:@"(null)"]) {
objKey = [NSString stringWithFormat:@"%@",[child stringValue]];
} else if([[child name] isEqualToString:@"key"] || [[child name] isEqualToString:@"value"]) {
objKey = [NSString stringWithFormat:@"%@",[child name]];
} else {
objKey = [NSString stringWithFormat:@"%@%d",[child name],i++];
}
}
[d setObject:v forKey:objKey];
NSLog(@"child %@ added", objKey);
}
return d;
}
soap class will use this method to convert that data set into dictionary. Its working perfectly in IOS 5 but its not working in ios 6. Application will crash in ios 6 and through error as " CXML copy with zone "Please help me to fix this issue.