Iphone 如何从sudzc获取xml或反序列化响应?
我刚刚开始在iOS iPhone应用程序上使用sudzc进行一些测试,以访问soap服务。我使用了带有正确wsdl链接的sudzc,并下载了定制代码 然后,我使用以下命令初始化服务:Iphone 如何从sudzc获取xml或反序列化响应?,iphone,ios,xml,soap,sudzc,Iphone,Ios,Xml,Soap,Sudzc,我刚刚开始在iOS iPhone应用程序上使用sudzc进行一些测试,以访问soap服务。我使用了带有正确wsdl链接的sudzc,并下载了定制代码 然后,我使用以下命令初始化服务: // Create the service service = [EMLMagentoService service]; 并与以下人员展开对话: // Returns NSString* /* Login user and retrive session id */ SoapRequest *result=[se
// Create the service
service = [EMLMagentoService service];
并与以下人员展开对话:
// Returns NSString*
/* Login user and retrive session id */
SoapRequest *result=[service login:self action:@selector(loginHandler:) username: @"user.test" apiKey: @"GJGDWYgfgjgYGuueyfgue"];
返回我的会话ID字符串。。。然后我在下一次通话中使用该ID
// 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);
}
我得到的是一个没有任何格式的字符串。。。没有xml。。。没有数组对象
##### loginHandler ######
##### callHandler ######
Kind of class: __NSCFString
result:category_id2parent_id1nameDefault Categoryis_active1position1level1
如何获取xml或反序列化对象