Copy link to clipboard
Copied
Setup:
ColdFusion 8 Developer - running on a RedHat Linux
Flex Build 3 Trail - running on Window Vista
How do I set up Flex Builder 3 to connect to a ColdFusion's CFC, without installing
everything locally?
I have tried the following:
1) http://www.adobe.com/devnet/flex/articles/coldfusionflex_part3.html
2) http://www.adobe.com/devnet/flex/flex_cf.html
3) ActionScript 3.0 Cookbook
Copy link to clipboard
Copied
I have a similar setup
Network Sever (windows XP) with JRUN+ColdFusion 8
Flex Builder 3 running on Vista (my PC).
Here's how I setup a new Flex Project to work with ColdFusion (Flex Remoting).
First I have a mapped drive "S:\" that points to a drive (D:\) on the server.
That drive contains the JRUN install, its local path is D:\JRun4\
On the server, the ColdFusion root is at:
D:\JRun4\servers\cfusion\cfusion-ear\cfusion-war
So from my PC to get to the ColdFusion root I use:
S:\JRun4\servers\cfusion\cfusion-ear\cfusion-war
When I create a ColdFusion/Flex application, the only thing different from a "normal" Flex application is that I compile to a directory on the server rather than a local directory.
Here's how:
File -> New -> Flex Project
In the "New Flex Project" wizard, fill in a project name.
At the bottom select "ColdFusion" as Application Server Type from the dropdown list.
Enable "Use remote object access service" and select "ColdFusion Flash Remoting".
On the next page you have to configure ColdFusion.
For server type, I select "Deployed to J2EE server" as I have CF running on top of JRUN.
The Web root is: S:\JRun4\servers\cfusion\cfusion-ear\cfusion-war
If you don't have a mapped drive you can probably use something like \\SERVERNAME\path_to_root\
Root url: http://muzakserver:8300/
Context Root: leave empty
I have Coldfusion WAR is located in web root selected.
At the bottom, select where to compile to, make sure this is a location within your web server (so I can be reached through a browser).
I used S:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\cf_test
Again, this is using the mapped drive (S:\)
Last thing to do is fill in the url to the application directory on the next page.
At the bottom of the "Source Path" tab, fill in the "Output Folder URL" which in my case is: http://muzakserver:8300/cf_test/
When I then click Finish and run or debug the project it opens up in a browser pointing to:
http://muzakserver:8300/cf_test/CF_test.html
Have a look at the attached screenshots.
Copy link to clipboard
Copied
Muzak,
First, I didn't want to setup a Samba share, but you do what works.
Second, I can't find "JRun*" or "cfustion-war" on my server.
So, I am still stuck.
Brian
Copy link to clipboard
Copied
First, I didn't want to setup a Samba share, but you do what works.
AFAIK, that's not required.
Second, I can't find "JRun*" or "cfustion-war" on my server.
That's because you have the standalone ColdFusion server installed.
Just adjust the paths I mentioned to whatever your config is.
On the second page in the new project wizard (the server config) select Standalone for the Coldfusion Installation type
Deselect both "Use default location for CF server" and "Use built-in CF server" and fill in (and/or browse to) the proper locations.
Copy link to clipboard
Copied
In response to Muzak:
I need to make a few changes to your solution:
1) add two shares (Done using Samba)
The first points to the install path on the Linux Server.
/opt/coldfusion8/ (default for RedHat Linux Installs)
The second maps to website's root,
2) Then map those drives on the Windows Machine.
I post these for next person, you might be a little dense in
figure this out.
The rest of the steps worked,
Thanks.
In response to:
Michael Borbor wrote:
>> If you want to access data from a remote CF, you can just
>> create a Flex Project without a server type, use a
>> RemoteObject, and set the endPoint property to the url
>> where your CF server is.
I was trying to create a "RemoteObject", but I couldn't get that to
work. (I admit to being a little dense at the start of a project.)
After, following the examples, nothing worked.
I needed a working example for my situation, so I could figurate
out what I was doing wrong. If Flex can generate most of
the code for the project, that is even better.
Thanks, again.
Copy link to clipboard
Copied
I need to make a few changes to your solution:
1) add two shares (Done using Samba)
The first points to the install path on the Linux Server.
/opt/coldfusion8/ (default for RedHat Linux Installs)
The second maps to website's root,
2) Then map those drives on the Windows Machine.
I post these for next person, you might be a little dense in
figure this out.
The rest of the steps worked,
Thanks.
Glad to hear you got things working.
I'm not familiar with Linux, so wasn't sure about the shares/mapping.
On windows you can use \\PC_NAME\shared_folder so a mapped drive isn't really required, but it does make things easier (well at least I think so)
Happy coding
Copy link to clipboard
Copied
If you want to access data from a remote CF, you can just create a Flex Project without a server type, use a RemoteObject, and set the endPoint property to the url where your CF server is.