1 Reply Latest reply on Jul 14, 2006 1:44 PM by mac_martine

    lastResult problem....

    MarcoBazza
      I wrote a webservice like that:
      <mx:WebService id="feedRequest"
      wsdl=" http://jsuite:8080/axis/services/SoaTest?wsdl"
      useProxy="false"
      showBusyCursor="true"
      >
      <mx:operation name="getResult" >
      <mx:request >
      <par>Test value</par>
      </mx:request>
      </mx:operation>
      </mx:WebService>

      And I want to fill a dataGrid with the xml returned by the service.

      <mx:Script>
      <![CDATA[
      import mx.controls.List;
      import mx.utils.XMLUtil;

      [Bindable]
      public var soaXML:XMLList = new XMLList();

      public function xmlPareser():void {
      var webXML:XML = XML("<ROWSET><ROW><PARAMETRO>Prova</PARAMETRO></ROW></ROWSET>");
      var title:String = webXML.ROW.PARAMETRO;
      pannello.title = title;
      feedRequest.getResult.send();
      var xmlMessage:String = feedRequest.getResult.lastResult;
      var appXML:XML = new XML(xmlMessage);
      soaXML = appXML.ROW;
      }
      ]]>
      </mx:Script>

      The dataGrid dataProvider is {soaXML}, the problem is that the first time when the application start the dataGrid is empty but if I click to a button that invoce xmlParser() the datagrid will be filed. I debug the application and I found that feedRequest.getResult.lastResult is empty the first time that method is colled and is fill with the xml returned by the service the second time.

      Why ?