I have a question related to Flex 3 and ColdFusion that it might be simple to answer but I have been struggling with it for a while.
How to create a Flex application using Flex Builder 3 that uses ColdFusion, but the ColdFusion server is not installed locally but in a remote server?
I need to create a Flex application to use with ColdFusion and although this is a simple procedure when we are creating the project in a computer where you have ColdFusion installed locally (as all books shows examples of it), but what if the ColdFusion server is installed in another machine in the network?
My current situation is the following:
- I have Flex Builder 3 install in my PC at work and its workspace is in a folder in the network outside of my PC.
- We have a server (ISWEB1) partition in two drives; C, where the ColdFusion 8 is installed and D where all the files the developers work with reside. The ColdFusion installation runs in a server where IIS is used as the web server.
- I have the drive D on the server ISWEB1 mapped to one of my letter drives and can access it easily
- The drive C on the Server can only be accessed remotely (or through the web to access the ColdFusion admin page) and is not exposed to the network as drive D is.
My problem is, I need to create a Flex 3 application that uses ColdFusion using remote object access service (CF Flash Remoting) but I wanted to point to the installation version on the server ISWEB1 and not to the one installed locally. The Configure ColdFusion Server screen in the Flex Builder asked me for the location of ColdFusion root folder, Web root, and root URL. There is no way I can point to the server (ISWEB1)where ColdFusion is installed as those fields seem to required a address that points to a local install or a mapping on that local server.
The work around that could be used is to use the ColdFusion developers edition I have installed locally and use during the creation of the project in Flex Builder, but then I would have to have all the same data sources, mappings, and CFCs in my the local server in order to test, which seems double work. To aggravate that when you try to test the application Flex writes the files to the local server and unless you have everything available locally it would not work properly. I am trying to avoid duplicating the work. Ideally I would like to test the Flex application on the server where the CF is installed and where the Flex Builder workspace is.
Hi, did you ever figure this out? I'm trying to do the exact same thing now except with Flex 4 and ColdFusion9
Sort of. I found this article below that helped me to connect to the remote CF server using MXML. It seems that you have to create a regular project in Flex with Aplication Server Type set to None and connect to CF using the endpoint attribute of the RemoteObject MXML tag or via AS.
However I found out after getting error using the AS3 code to use the endpoint property that
mx.rpc.remoting.RemoteObject does not support the "endpoint" property
whereas mx.rpc.remoting.mxml.RemoteObject does. See link below
So I had to change my AS3 code by adding a new channel to my RemoteObject using a code similar to the one on the link below (Note that this code uses PHP, when I instantiate myRemoteObject, I do so informing that the destination is "ColdFusion" [new RemoteObject("ColdFusion")], so no need to set destination as in the code on the link below
I hope that helps you.