我正在尝试使用 sudzc.com 在 iOS 中访问 SOAP Web 服务。看来我得到了肥皂信封作为回报。但我不确定如何处理结果。我可以以某种方式将结果放入 NSDictionary 中还是如何进行?
- (void)run {
// Create the service
SDZDevices2Api* service = [SDZDevices2Api service];
service.logging = YES;
// Returns NSString*. (added searchstring and max count values)
[service LocationFindSimple:self action:@selector(LocationFindSimpleHandler:) SearchString: @"Vejle" Max: 1 BankId: [NSMutableArray array] BankName: [NSMutableArray array] Id: [NSMutableArray array] Name: [NSMutableArray array] Icon: [NSMutableArray array] Zip: [NSMutableArray array] Attributes: [NSMutableArray array]];
}
// Handle the response from LocationFindSimple.
- (void) LocationFindSimpleHandler: (id) value {
// Handle errors
if([value isKindOfClass:[NSError class]]) {
NSLog(@"%@", value);
return;
}
// Handle faults
if([value isKindOfClass:[SoapFault class]]) {
NSLog(@"%@", value);
return;
}
// Do something with the NSString* result
NSString* result = (NSString*) value;
NSLog(@"LocationFindSimple returned the value: %@", result);
}
这是日志消息: