0 Replies Latest reply on Dec 5, 2006 5:42 PM by ross.hibbert

    Connecting to Database Using Coldfusion Components - Error Message

    ross.hibbert
      I have the 30 day trial version of flex 2.0. I want to purchase this product, because I can see the value behind this platform, however I'm hesitant considering I can't figure out why I can't connect to coldfusion components. I've seen multiple posts on how to address, however most of them are not related to flex 2.0. I get the following error message:

      Client.Error.MessageSend
      Channel.Connect.Failed error
      NetConnection.Call.Failed: HTTP: Failed

      Attached is my source code:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" backgroundAlpha=".35" backgroundColor="#800000" width="100%" height="100%" creationComplete="initApp()" >

      <mx:Script>
      <![CDATA[
      import jhu.admin_fees;
      import mx.collections.ArrayCollection;
      import mx.rpc.events.*;
      import mx.controls.Alert;
      private function initApp():void
      {
      // Force phone class to load
      trace("SERVICE BEFORE")
      svc.getAll()
      trace("SERVICE_AFTER")
      }
      [Bindable]
      public var fees:ArrayCollection = null;
      public function resultHandler(event:ResultEvent):void
      {
      var p1:ArrayCollection = new ArrayCollection();
      p1.source=event.result as Array;
      fees = p1;
      }

      private function getAll_result( event:FaultEvent ) : void
      {

      }
      private function handleFault( event:FaultEvent ) : void
      {
      var fault:* = event.fault;
      mx.controls.Alert.show(event.fault.faultCode+": "+event.fault.faultDetail,
      event.fault.faultString);
      }
      ]]>
      </mx:Script>

      <mx:RemoteObject id="svc" destination="ColdFusion"
      source="myinfo.jhu.admin_feesGateway"
      result="resultHandler(event)"
      fault="handleFault(event)"
      showBusyCursor="true" >
      <mx:method name="getAll"/>
      <!--result="getAll_result(event)"-->
      </mx:RemoteObject>

      <mx:Panel title="My Application" width="248" horizontalAlign="center" verticalAlign="top" alpha="1" backgroundAlpha=".5" backgroundColor="#FFFFFF" toolTip="THIS IS MY APPLICATION!" x="10" y="10">
      <mx:ColorPicker closeDuration="0" openDuration="0"/>
      <mx:ComboBox enabled="true" id="df" closeDuration="0" openDuration="0" borderThickness="4" borderColor="#000080" textRollOverColor="#008000" textSelectedColor="#FF0000" textAlign="center" selectionDuration="0" selectionColor="#808000" color="#FF0000" rollOverColor="#FF0000" dropdownBorderColor="#008000" errorColor="#FF0000" disabledColor="#808080" textDecoration="underline" visible="true" toolTip="testing out my tooltip" alpha="1" editable="true"></mx:ComboBox>
      <mx:DataGrid width="162" headerHeight="27" id="sfdsd" resizableColumns="true" rowHeight="17" showHeaders="true" horizontalGridLineColor="#FF8040" horizontalGridLines="true" paddingTop="4" rollOverColor="#008000" selectionColor="#FF0000" selectionDuration="0" shadowDirection="right" shadowDistance="1" textAlign="center" textRollOverColor="#0000FF" textSelectedColor="#FF8040" useRollOver="true" verticalAlign="middle" verticalGridLineColor="#008000" verticalGridLines="true">
      <mx:columns>
      <mx:DataGridColumn headerText="Column 1" dataField="col1"/>
      <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
      <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
      </mx:columns>
      </mx:DataGrid>
      <mx:DateChooser/>
      </mx:Panel>
      <mx:Button x="296" y="242" label="Button" borderColor="#000080" id="egsdf" selected="true" toggle="false" emphasized="true" alpha=".75" focusRoundedCorners="25"/>
      <mx:PopUpButton x="280" y="301" label="PopUpButton"/>
      <mx:PopUpMenuButton x="280" y="331" label="PopUpMenuButton"/>
      <mx:TextInput x="280" y="271" borderStyle="solid" />
      <mx:ViewStack x="266" y="35" id="viewstack1" width="200" height="199">
      <mx:Canvas label="View 1" width="100%" height="100%">
      </mx:Canvas>
      <mx:Canvas label="sadfsdf" width="100%" height="100%">
      </mx:Canvas>
      <mx:Form label="sv" width="100%" height="100%">
      <mx:FormItem label="Label">
      <mx:ButtonBar dataProvider="viewstack1">
      </mx:ButtonBar>
      </mx:FormItem>
      </mx:Form>
      <mx:Canvas label="sssssss" width="100%" height="100%">
      </mx:Canvas>
      </mx:ViewStack>
      <mx:ToggleButtonBar x="266" y="10" dataProvider="viewstack1">
      </mx:ToggleButtonBar>
      </mx:Application>