Hi Franck, Thanks for the response. I am still having the same problem though, which is that I end up with a generic 'item' tag or property being created somewhere along the way. I am beginning to think that this structure cannot be created in AS as it seems like I would need an object with 2 properties named PlanNumber.
I tried using an object with a PlanNumber property of type Array, and then stuffing the values into that, but that turns into <SelectedPlans xmlns=""> <item xmlns="">78167</item> <item xmlns="">78173</item> </SelectedPlans> Is there a way to create a default property of an object or something? Does valueOf() still exist? Ben --- In flexcoders@yahoogroups.com, "Franck de Bruijn" <[EMAIL PROTECTED]> wrote: > > Hi Ben, > > > > I do the following to achieve this. > > > > Let's say I have a Customer who can have multiple Address objects. Compare > Customer with your SelectedPlans and Address with PlanNumber. > > > > My Customer AS class looks like this (boring parts omitted) > > > > package model { > > > > <your imports ...> > > > > public class Customer > > { > > <your other attributes> > > public var addresses:Array = new Array(); > > > > <and the rest ... > > > > The Address AS class is nothing more than this: > > > > package model { > > > > <your imports ...> > > > > public class Address { > > public var street:String; > > public var houseNumber:int = 0; > > > > <... you get the idea> > > > > To store multiple Address objects into the Customer object, you just fill > the array 'addresses' with Address objects. > > > > You can now throw the entire Customer object as single argument into your > webservice call. Flex will unmarshal the array correctly and generate the > XML as you describe below. > > > > Hope this helps, > > Cheers, > > Franck > > > > > > _____ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of ben.clinkinbeard > Sent: Monday, August 07, 2006 3:11 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Web Service arguments in AS - how do you create > repeated children? > > > > Hello, I am sending arguments to my SOAP method, but can't figure out > how to do repeated children in AS. For example, part of my call looks > like this in XML: > > <SelectedPlans> > <PlanNumber>12345</PlanNumber> > <PlanNumber>56789</PlanNumber> > </SelectedPlans> > > I cannot figure out how to create this structure in AS. It seems that > I have to use an Object (args.SelectedPlans = new Object();) in order > for the name to be preserved during the conversion to XML, but objects > obviously can't have 2 properties with the same name. > > Does anyone know how to do this? > > Thanks, > Ben > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/