【问题标题】:How to Consume SAP WSDL services in Objective c?如何在 Objective c 中使用 SAP WSDL 服务?
【发布时间】:2013-03-26 01:12:20
【问题描述】:

要使用 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。但我得到 response.bodypart 也是 NULL。为什么响应 bodyparts 得到 Null?

谁能帮帮我。 谢谢

【问题讨论】:

    标签: ios objective-c wsdl sap


    【解决方案1】:

    我没有使用 wsdl2Objc,因为我为此编写了自己的代码。但是wsdl2code 是一个更适合使用 Soap 的库。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-08-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-01
      • 1970-01-01
      相关资源
      最近更新 更多