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;
My question is, how do I pass values into the parameters that expect NSMutableArrays?
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:
- 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.
I had similar situation of passing array of objects to SOAP request. I managed to get it working by doing following changes.
SOAP array case in not added in
so I managed to change in the following method
at the time SOAP request,
Pass element arr object your SOAP Request ??
This is a bit old, but I hope it will help someone. I implemented the
serialize:
method on SoapArray this way:As you can see, there are some commented lines. If you uncomment them and comment the currently used one inside the for, you will get a tag named name which will contain objects tagged with the content class name.
@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...
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....