The Railo team has been hard at work pushing out updates quicker then we can install them - well not really as it only takes less then a minute to upgrade Railo :) . One of the most recent and exciting updates that has come out with 3.1.0.15 and .16 preview is the ability to communicate with Flex over AMF the same way you can with ColdFusion.
Here is a run through of how I set this up. As I run ColdFusion and IIS on my local machine to duplicate our main production environment I really didn't want to mess with all my settings and didn't want 2 CFML engines running all the time I opted to install ( extract from zip ) the
Express Edition of Railo so I can start and stop easily with a batch file.
I extracted the zip to e:\RailoExpress
Copied the E:\RailoExpress\webroot to E:\RailoExpress\wwwroot ( to mirror ColdFusion's directory structure )
Start the Railo express server by running the "Start.bat" file. Confirm Railo is running by hitting http://127.0.0.1:8888 and confirm that http://127.0.0.1:8888/flex2gateway returns a blank page.
Open Flex(Flash)Builder. Created a new Flex Project.
Selected the server type as "ColdFusion", click next.

This is where there are a few changes. FlexBuilder expects there to be wwwroot in the ColdFusion server directory this is the reason I made the copy in step 2. I wont need to modify the .xml files in the WEB-INF for this example.
I'm not going to be using IIS as the webserver I'm happy with the one that comes with Railo express ( Jetty ) and the default port is 8888. Also set the webroot to the webroot folder under the Railo install directory.

Click finish and you can start coding.
If you want to check the compiler arguments right click the project, select properties, then Flex Compiler and it should look like this:

From this point I made a simple cfc that runs a query and returns it to flex. Drop the cfc into the webroot ( E:\RailoExpress\webroot ) called Query.cfc ( mappings work the same way they do in ColdFusion also )
I made a simple program to get the query data and display it in a grid. The code looks just the same as it would with ColdFusion. Also notice the source of the remote object is "Query" which matches to the name of the .cfc if you had this in a mapping it would be com.project.Query for example and this would work fine.
Demo:
Demo with source view can be seen
here
The .16 update ( currently in preview ) fixed the issue where the column name's were always coming back as lower case now they are the correct case. It also addressed the issue of correct casing of VO's ( which is also working in my limited test cases ).
I picked a query as an example but all other data types seam to be working except a few odd ones ( I tried sending an image data blob back it didn't work....yet ) and all in all this will probably satisfy most people working with Flex and ColdFusion and now they can offer a slick backend to there clients as an alternative to ColdFusion.
The database is a sample from
mySQL