如何将值数组传递给SudzC生成的Web服务类? [英] How do I pass arrays of values to SudzC-generated webservice classes?

查看:105
本文介绍了如何将值数组传递给SudzC生成的Web服务类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从WSDL生成的sudzc服务类,它接受一个ArrayOfInt和ArrayOfString对象作为参数。服务方法签名是这样的:

I have a sudzc service class generated from a WSDL that accepts an ArrayOfInt and ArrayOfString objects as parameters. The service method signature is this:

- (SoapRequest*) Search: (id <SoapDelegate>) handler filters: (NSMutableArray*) displayedAttributes: (NSMutableArray*) displayedAttributes;

我的问题是,如何将值传递给期望NSMutableArrays的参数?

My question is, how do I pass values into the parameters that expect NSMutableArrays?

在上面的方法签名中,displayedAttributes参数需要一个 ArrayOfInt 对象(应该用int中的几个整数填充)标签,例如,< int> 1< / int>< int> 2< / int>< int> 3< / int> 等)。

In the above method signature, the "displayedAttributes" parameter is expecting an ArrayOfInt object (which should be populated with several integers in an int tag, e.g., <int>1</int><int>2</int><int>3</int> etc).

然而,我尝试过的这些事情都没有奏效:

However none of these things which I've tried have worked:


  • 直接通过(int)对象的NSArray / NSMutableArray

  • 直接传递NSNumber对象的NSArray / NSMutableArray

  • 传递包含@1的字符串数组, @2,@3等

  • 传递已包含 @< int> 1< / int> @< int> 2< / int>

  • 构建 CXMLDocument 基于整数的字符串

  • Directly passing an NSArray/NSMutableArray of (int) objects
  • Directly passing an NSArray/NSMutableArray of NSNumber objects
  • Passing an array of strings containing @"1", @"2", @"3" etc
  • Passing an array of strings that already contain @"<int>1</int>", @"<int>2</int>", etc
  • Constructing a CXMLDocument out of a string based on the integers

我确信这在下载的随附文档中有所解释 - 目前我还不清楚。

I'm sure this is somehow explained in the accompanying documentation in the download -- it's just not clear to me at the moment.

推荐答案

@Jon Limjap:幸运的是你!它询问你之前处理过的类型,我有自己为我生成的自定义类类型(!)...它只在传递CXMLNode时初始化,(需要CXMLDocument / CXMLElement)...我不知道如何处理这种类型...

@Jon Limjap: Lucky you are!!! it asks you for a type which you have dealt before, I have custom class type that SudzC generated for me (!)... It initializes only when passed CXMLNode, (which need CXMLDocument / CXMLElement).. I have no idea how to deal with such type...

一个实例是:filter是一个类,我有一个类的过滤器,但没有办法初始化它,(除了alloc-init然后设置它的属性,但它的属性是另一个这样的自定义类型.. !!!!)...如果你知道告诉/配置sudzc以允许我们传递对象或获取可可对象的任何技巧类型,告诉我....

an instance is: filter is a class, I have a class of the filter, but there is no way to initialize it, (except alloc-init and then setting its properties, but its properties are another such custom type.. !!!!)...If you know any "trick" to tell/configure sudzc to allow us to pass objects or fetch objects of cocoa type, do tell me....

这篇关于如何将值数组传递给SudzC生成的Web服务类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆