ios - 如何在 Objective c 中使用 SAP WSDL 服务?

标签 ios objective-c wsdl sap

要使用 WSDL 服务,我引用了 http://code.google.com/p/wsdl2objc/wiki/UsageInstructions 中的代码.我的代码是

  ZESRV_PM_SEARCH_PARAMETERS *binding = [[ZESRV_PM_SEARCH_PARAMETERS alloc] initWithAddress:urlString]; 
   binding.logXMLInOut = YES;
   binding.authUsername = username; 
   binding.authPassword = password;


   NSMutableArray *array=[[NSMutableArray alloc]init];
   [array addObject:@"Karama"];
   [array addObject:@"Commercial"];
   [array addObject:@"Industrial"];


   ZESRV_PM_SEARCH_PARAMETERSSvc_TableOfZesrvLocation *request = [[ZESRV_PM_SEARCH_PARAMETERSSvc_TableOfZesrvLocation alloc] init];

   request.item=array;

   ZESRV_PM_SEARCH_PARAMETERSResponse *response = [binding ZesrvPmSearchParametersUsingParameters:request];
   NSLog(@"response %@",response);

   NSError * responseError = response.error;

   NSLog(@"responseError %@",responseError);

   NSArray *array=response.bodyparts;

   dispatch_async(dispatch_get_main_queue(), ^{
       [self processResponse:response];
   });

这里我得到的响应是 Null,响应错误是 Null。但是我得到的是 response.bodypart 也是 NULL。为什么响应 bodyparts 是 Null?

谁能帮帮我。 谢谢

最佳答案

我没有使用 wsdl2Objc,因为我为此编写了自己的代码。但是wsdl2code是用于处理 Soap 的更好的库。

关于ios - 如何在 Objective c 中使用 SAP WSDL 服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15803124/

相关文章:

ios - 将应用上传到应用商店后出错

ios - 如何检测两个UIView的边框是否接触?

c# - 用另一个分部类覆盖分部类的默认构造函数

web-services - 不使用 @XMLRootElement 注释解码 REST 响应

ios - 平行打印后保证打印顺序

ios - 具有自动布局的 UITableViewCell 子类如何在运行时更改约束优先级

ios - 在 NSString 中搜索方括号

c - HMAC-SHA1 的 Objective-C 示例代码

objective-c - 我如何使用 PodioKit 和 PKTSearchAPI 在 Podio App 中进行搜索?

java - 为什么 WSDL 解析器仍然导入外部文件?