How get xml or deserialized response from sudzc?

lebaduc

New Member
I just started some tests with sudzc on iOS iPhone app to access a soap service. I used sudzc with the link to the correct wsdl and downloaded the customized code.Then I initialize the service with:\[code\]// Create the serviceservice = [EMLMagentoService service];\[/code\]and open a session with:\[code\]// Returns NSString*/* Login user and retrive session id */SoapRequest *result=[service login:self action:@selector(loginHandler:) username: @"user.test" apiKey: @"GJGDWYgfgjgYGuueyfgue"];\[/code\]that returns my session ID string... than I use that ID for the next call\[code\]// Handle the response from login.- (void) loginHandler: (id) value { NSLog(@"##### loginHandler ######"); // Handle errors if([value isKindOfClass:[NSError class]]) { NSLog(@"%@", value); return; } // Handle faults if([value isKindOfClass:[SoapFault class]]) { NSLog(@"%@", value); return; } NSString *sessionID = (NSString *)value; [service call:self action:@selector(callHandler:) sessionId:sessionID resourcePath:@"catalog_category.level" args:nil];}// Handle the response from call.- (void) callHandler: (id) value { NSLog(@"##### callHandler ######"); // Handle errors if([value isKindOfClass:[NSError class]]) { NSLog(@"%@", value); return; } // Handle faults if([value isKindOfClass:[SoapFault class]]) { NSLog(@"%@", value); return; } NSLog(@"Kind of class: %@",[value class]); NSLog(@"result:%@", value);}\[/code\]What I get is a string without any format... no xml... no array object...\[code\]##### loginHandler ###### ##### callHandler ###### Kind of class: __NSCFString result:category_id2parent_id1nameDefault Categoryis_active1position1level1\[/code\]how can I get an xml or a deserialized object?
 
Back
Top