FYI - I'm seeing the same thing as you with my tests - it looks like
only the first array element is available on the server side
(There may be a Flex/HTTP limitation here - not sure ).

             var  ipArray:Array = [];
             var rowdata:String = '';
             rowdata ='1234';
              for (var j:int=0 ; j<3;j++) {                  // populate
array -  adding  3  array elements
                     ipArray.push(rowdata);
             }
             // Prepare to send
             testVO.ipArray= ipArray;
             httpSvc.send(testVO);                        //Am only only
seeing the first array element server side
         }

     public class testVO
     {
             public var ipArray:Array;
     }


--- In [email protected], "Guilherme Blanco"
<[EMAIL PROTECTED]> wrote:
>
> There's one thing you missed here....
>
> I have this:
>
> var params:Object = new Object();
> params.viewId = _viewId;
>
> itemService.send(params);
>
>
> And it works ok...
>
>
> But If I try this:
>
> var params:Object = new Object();
>
> params.viewId = _viewId;
>
> params.foo = new Array();
> params.foo.push(1);
> params.foo.push(2);
> params.foo.push(3);
>
> service.send(params);
>
>
> It doesn't work.
> Currently I do like this:
>
> var params:Object = new Object();
>
> params.viewId = _viewId;
>
> params.foo_0 = 1;
> params.foo_1 = 2;
> params.foo_2 = 3;
>
> service.send(params);
>
>
> To be able to get it working... so... my question is if it's possible
> to send an array through service.
>
>
> []s,
>
>
> On Thu, Jul 17, 2008 at 3:36 PM, pbrendanc [EMAIL PROTECTED] wrote:
> > Guilherme,
> > I'm also testing this and have passed a parameter object as part of
my
> > HTTP request as follows:
> >
> > httpSvc.send(testVO);
> >
> > However I'm not seeing the parameter values in the HTTP request when
I
> > debug on the server side. However they do show up when I look at the
> > request using the Web development helper tool (very useful
tool/plugin
> > to monitor request/responses - here's a link):
> >
> > http://projects.nikhilk.net/WebDevHelper/
> >
> > I'm not even sure if this is supposed to work (the docs here might
be
> > wrong/misleading as they show that a parameter arg for send method -
> > however the Flex examples I've seen never populate the parameter
object
> > ). Like you I also want to pass an array via HTTP (my data is not
bound
> > to a form field so I don't want to use mxml).
> >
> > I may be missing something really obvious here - can't think what .
> > Perhaps it depends on the server side implementation of the
httpRequest
> > Object but i thought that was pretty standard.
> >
> > If anyone can jump in here with sample working code that would
really
> > help.
> >
> > Patrick
> >
> > --- In [email protected], "Guilherme Blanco"
> >
> > guilhermeblanco@ wrote:
> >>
> >> Hi guys,
> >>
> >>
> >> I'm interested if it's possible to send an array as a parameter
when
> >> doing an HTTP request.
> >> Curretly, we can directly do it:
> >>
> >> foo[]=1&foo[]=2&foo[]=3
> >>
> >> Most server side languages understand this as
> >>
> >> foo = Array(
> >> [0] = 1,
> >> [1] = 2,
> >> [2] = 3
> >> )
> >>
> >> I tried the same in Flex:
> >>
> >> var params:Object = new Object();
> >>
> >> params.foo = new Array();
> >> params.foo.push(1);
> >> params.foo.push(2);
> >> params.foo.push(3);
> >>
> >> service.send(params);
> >>
> >> But it doesn't work... I'm curious how can this be achieved in Flex
> >>
> >>
> >> Thanks in advance,
> >>
> >>
> >> Regards,
> >>
> >> --
> >> Guilherme Blanco - Web Developer
> >> CBC - Certified Bindows Consultant
> >> Cell Phone: +55 (16) 9166-6902
> >> MSN: guilhermeblanco@
> >> URL: http://blog.bisna.com
> >> Rio de Janeiro - RJ/Brazil
> >>
> >
> >
>
>
>
> --
> Guilherme Blanco - Web Developer
> CBC - Certified Bindows Consultant
> Cell Phone: +55 (16) 9166-6902
> MSN: [EMAIL PROTECTED]
> URL: http://blog.bisna.com
> Rio de Janeiro - RJ/Brazil
>


Reply via email to