0 Replies Latest reply on Sep 10, 2007 6:05 AM by

    List not populating correctly

      I have defined a service which takes a list as argument. But when the service is invoked from flex , only the first element of the list is being transfered to the server.

      The flex code where the list is populated is as follows :

      public function sendSimpleList():void {
      listObject1 = new ArrayCollection();
      listObject1.addItem(new String("aaaaaa"));
      listObject1.addItem(new String("vvvvvv"));
      listObject1.addItem(new String("gggggg"));

      registrationWS.sendSimpleList.send();
      }

      and the invocation is as follows :

      <mx:operation name="sendSimpleList">
      <mx:request>
      <in0>
      {listObject1.length}
      </in0>
      <in1>
      {listObject1}
      </in1>
      </mx:request>
      </mx:operation>

      and the service code is as follws :

      public void sendSimpleList(int lt,List list)
      {
      System.out.println("Reading Simple List.....");
      System.out.println(lt);
      System.out.println("Size : "+list.size());
      for (Object ib : list) {
      String st = (String) ib;
      System.out.println(ib);
      }
      }
      Here lt is the length which shows 3 but size of the list is displayed as 1.
      Could anyone please suggest what is the problem in the code?