Accessibility

TechNote

Flex Builder 2 RemoteObject calls to ColdFusion 8 CFCs fail

Issue


You are unable to connect Adobe Flex Builder 2 RemoteObjects to Adobe ColdFusion 8 CFCs.

Reason


Flex Builder 2 projects containing RemoteObject calls to ColdFusion 8 fail to connect for the following reasons:

  • You have not entered the proper compiler arguments which point to your ColdFusion 8's services-config.xml and or your ColdFusion server's context root.
  • You have created your Flex Builder 2 project as a "ColdFusion Flash Remoting Service." This is not appropriate if you are connecting to ColdFusion 8 CFCs.
  • You are using ColdFusion 8's embedded web server (typically running from port 8500) and you are trying to run your Flex project from within Flex Builder.
  • You do not have your ColdFusion 8 CFCs located in your server's web root.

Solution


Create your Flex Builder 2 project
  1. Create a "Basic" (e.g. XML or web service from PHP/JSP/ASP.NET) Flex project.
  2. Change your project's Output folder to point to your web root (if using ColdFusion 8's embedded web server, use {cfusion8_root}/wwwroot/your_project_name).
  3. Click Finish, right-click your project from the Navigator pane of Flex Builder 2, and then choose Properties.
  4. In the Flex Compiler section, add the appropriate Additional Compiler Arguments. For example:

    -services=C:\ColdFusion8\wwwroot\WEB-INF\flex\services-config.xml -context-root=/ -locale en_US.

  5. Click OK
Ensure ColdFusion 8 CFCs are setup properly
  • If using ColdFusion 8's embedded web server, ensure you have you CFCs located somewhere beneath the {cfusion8_root}/wwwroot/ directory
  • If using an external web server, ensure you have your CFCs located somewhere beneath your web server's web root, for example IIS is typically C:/Inetpub/wwwroot/
  • Ensure the "source" attribute of your Flex Project's <mx:RemoteObject> is correct. If your CFC is located in /wwwroot/myCFC/someCFC.cfc, then your "source" entry would be "myCFC.someCFC".
  • Ensure your database serving the data to your CFC is started and the ColdFusion 8 DSN is configured properly within ColdFusion Administrator
Run your Flex Application from the web root
  • Compile your project, but instead of running it from Flex Builder 2, open a web browser and go to http://host_name/website_name/flex_app_name/flex_project_name.html.

AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:kb404846

Products Affected:

coldfusion
flex
flexbuilder
livecyclees