2 Replies Latest reply on Feb 13, 2009 5:23 AM by rahimhaji

    connect xml with flex

    rahimhaji Level 1
      Dear Friends,
      iam doing my first project in flex. trying to connect a xml generated by php connected to mysql. i took an example from the following link:

      http://www.adobe.com/cfusion/communityengine/index.cfm?event=showDetails&postId=5561&produ ctId=2&loc=en_US

      my xml is generated. working fine. when i run my Flex, it is not working. it is giving the following error

      ------------------------------------
      Process terminated without establishing connection to debugger.

      Command:

      "C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\bin\adl.exe" C:\Rahim\TestApplications\Flexapplication\xmltest\bin-debug\xmltest-app.xml C:\Rahim\TestApplications\Flexapplication\xmltest\bin-debug

      Output from command:

      invocation forwarded to primary instance
      ----------------------------

      my flex file is :

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
      initialize="doSend()"
      layout="absolute">
      <mx:Script>
      <![CDATA[
      import mx.collections.ArrayCollection;
      import mx.rpc.events.ResultEvent;

      [Bindable]
      private var datalist:ArrayCollection;

      private function resultHandler(event:ResultEvent):void{
      datalist = event.result.data.row;
      }
      public function doSend():void {
      xmlFromDatabase.url = " http://localhost/flex/flexdb.php";
      xmlFromDatabase.send();
      }
      ]]>
      </mx:Script>
      <mx:HTTPService url=" http://localhost/flex/flexdb.php"
      id="xmlFromDatabase"
      showBusyCursor="true"
      result="resultHandler(event)"
      method="GET" />
      <mx:DataGrid x="10" y="10" dataProvider="{datalist}" id="dg">
      <mx:columns>
      <mx:DataGridColumn headerText="Col1" dataField="id"/>
      </mx:columns>
      </mx:DataGrid>
      </mx:Application>

      Thanks and Regards,
      Syed Abdul Rahim