2 Replies Latest reply on May 18, 2010 3:30 AM by BhaskerChari

    Problem in Flex to get XML result from web services


      Hi all

      I am struggling a proplem for a whole day, i hope somebody can help.

      I am trying to get the list file of files located on the server, so i use flex to access a ASP.NET ASMX web services, that returns all the file names in a folder.

      I can see that web servicese worked perfectly, however when i try to get the result from flex, i could not figure out how to get the real data i wantted



      public function LoadImage(e:ResultEvent):void{

      imageList.dataProvider = e.result;


      the e.result has some addtional tags, such as


      <GetImageFileListResponse xmlns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">


      where GetImageFileList is the operation name used in web service


      I am only interested in the data starting from <images> . I don't know why the addtioanl tag has been added.

      here is the code i have used in flex.





      wsdl="http://localhost/Flex/GetImageFiles.asmx?WSDL" id="imageWs">



      <mx:operation name="GetImageFileList" result="LoadImage(event)"

      fault="mx.controls.Alert.show(event.fault.faultString)" resultFormat="











      Thanks in advance!!!