Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WSCore: make soap calls: Help with creating element with maxOccurs unbound



Hi,
I could really use the list's help Im working on a client written in cocoa and struggle with making valid soap calls using WSCore (I struggle with calls where the params can contain elements that can occur multipe times):


Ill try to make myself more clear

I got this output to be made (simplified here)
<order>
	<orderposition>blabla</orderposition>
	<orderposition>blabla</orderposition>
	<orderposition>blabla</orderposition>
	<orderposition>blabla</orderposition>
	<name>lala<name>
</order>


Now, WSMakeStubs takes a CFTypeRef (so a void*) as Order so I could pass a custom object but I pass a dictionary with the params because that'll get serialized all by itself. The Problem is I cannot add serveral "orderposition" objects in a dictionary. I tried to add an NSArray to the Dictionary but that'll not produce the output above but:


<order>
	<array length="4">
		<0>
			<orderposition>blabla</orderposition>
		</0>
		<1>
			<orderposition>blabla</orderposition>
		</1>
		<2>
			<orderposition>blabla</orderposition>
		</2>
		<3>
			<orderposition>blabla</orderposition>
		</3>
	</array>
	<name>lala<name>
</order>


The result of soapCalls made via WSInvocation are all NSDictionaries with handle multiple elements in the first form just fine - giving me back an NSArray (which led me to believe I should fill the Parameters dictionary with one too!)


Im not yet sure I did it right and therefore if it is a bug. Im quite the NOOB when it comes to WSCore and hope it is my fault - then its easier to remedy :) BUT if it is a bug I'd be happy to report it. :)

I also read the docs and know I can add a Callback for my objects... but then I'd have to serialize all values in the custom orderPositions (which would be an array) myself, no? So ... i;d have to serialize every orderPosition and it's values (which could again be ComplexTypes)
==> I'd end up having to do almost all serializing myself then!?


Regards,
Dom
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.