0 Replies Latest reply on Jan 31, 2008 8:32 PM by CJSteu

    Flex & Web Service into Array / Array Collection

      this is probably not that hard, I am trying to invoke a web service as an Array Collection before bringing it into a Chart, though in this example, I am using a Datagrid. It came into DG fine as string data, but I will manipulate some and add multiple series, so I need to have it as Array Collection, I think. Anyway, here is code that does not run (no error messag)...

      <?xml version="1.0" encoding="utf-8"?>
      <!-- ChartVT/ChartVT.mxml -->

      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"

      import mx.rpc.events.ResultEvent;
      import mx.collections.ArrayCollection;
      import mx.controls.Alert;

      private var arr:Array = new Array

      private function resultHandler(event:ResultEvent):void
      var tikrdata:Object = event.result.diffgram.DocumentElement.tb1;
      var dp:ArrayCollection = new ArrayCollection(arr);

      <mx:WebService id ="ws" wsdl=" http://localhost:1240/CHARTVT/MyChartVT.asmx?WSDL" >
      <mx:operation name="GetData" result="resultHandler(event)" />

      <mx:DataGrid id="dp" x="10" y="126" width="598" height="203" >
      <mx:DataGridColumn headerText="Date" dataField="TrDate" />
      <mx:DataGridColumn headerText="Open" dataField="Open" />
      <mx:DataGridColumn headerText="High" dataField="High" />
      <mx:DataGridColumn headerText="Low" dataField="Low" />
      <mx:DataGridColumn headerText="Close" dataField="Close" />
      <mx:DataGridColumn headerText="Volume" dataField="Volume" />