0 Replies Latest reply on Jan 24, 2008 10:45 AM by Tom L

    Hello World Bombs

    Tom L
      I'm trying to run the small Flex 3 project that uses a Hello World script from the adobe site. The project uses a Coldfusion cfc which is very simple and only returns a string, what else but "Hello World". When i run the project I get the following error: "faultCode:Server.Processing faultString:'Unable to invoke CFC - Could not find the ColdFusion Component or Interface HelloWorld.' faultDetail:'For details, turn on Robust Exception Information in the ColdFusion Administrator'"

      In order to make sure I had Coldfusion working I build a small .cfm page in dreamweaver and in the same directory as the flex project, which called the cfc and it worked OK. I'm using local version of IIS running on XP pro. When I set the project up I was able to configure the project to point the inetpub/wwwroot OK and was able to Validate the Location. In order to get the Location to Validate however I had to copy the WEB-INF folder from the coldfusion8 directory down to the inetpub/wwwroot folder. I went to the project compile properties and under the compiler options it had: -services "C:\ColdFusion8\wwwroot\WEB-INF\flex\services-config.xml" -locale en_US. I tried changing this to point to the inetpub\wwwroot\WEB-INF\flex\services-config.xml, without success.

      I'd love to get moving with flex and coldfusion, but it looks like I stopped at the front door. Does anyone have an idea what might be causing the problem? Since the code is so small I pasted it below. I know the cfc works since I tested it with a .cfm page written in dreamweaver.

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

      [Bindable]
      public var sResult:String;

      public function handleStringResult(event:ResultEvent):void{
      sResult=event.result as String;
      }

      ]]>
      </mx:Script>

      <mx:RemoteObject
      id="myService"
      destination="ColdFusion"
      source="HelloWorld"
      showBusyCursor="true">
      <mx:method name="sayHelloString" result="handleStringResult(event)" fault="Alert.show(event.fault.message)"/>
      </mx:RemoteObject>

      <mx:Label id="lblStringResult" text="{sResult}"/>
      <mx:Button label="get String via Remote Object" click="myService.sayHelloString()"/>

      </mx:Application>