I solved it - the solution was in using an Array - not the 
ArrayCollection - when sending from Flex to web service.

So, it's convenient to have two types of collections - one for 
getting stuff from the web service, the other for putting stuff to 
the web service:

[Bindable]
public class MyDtoCollectionGet
{
public var IsError:Boolean = false;
public var ErrorMessage:String = "";
public var Items:ArrayCollection;
}

[Bindable]
public class MyDtoCollectionPut
{
public var IsError:Boolean = false;
public var ErrorMessage:String = "";
public var Items:Array;
}



--- In flexcoders@yahoogroups.com, "Danko Kozar" <[EMAIL PROTECTED]> 
wrote:
>
> I've got a weird problem:
> 
> - When passing an ArrayCollection (of strings) to the web service 
as 
> its method argument, everything works OK.
> 
> - But, when wrapping an ArrayCollection (of objects) into a custom 
> collection object, only the first item in the collection is 
> transferred. 
> 
> The problem is in Flex - I checked this using Fiddler.
> 
> ---------------------
> 
> This is my DTO item:
> 
> [Bindable]
> public class MyDtoItem
> {
>       public var Id:int = -1;
>       public var Name:String = "";
>       public var Value:String = "";
> }
> 
> I push my items into the MyDtoItem collection as its Items:
> 
> [Bindable]
> public class MyDtoCollection 
> {
>       public var IsError:Boolean = false;
>       public var ErrorMessage:String = "";
>       public var Items:ArrayCollection;
> }
> 
> Then I send this collection to the web service method which should 
> accept it (I checked the WSDL).
>


Reply via email to