Yesterday I was helping a ColdFusion user who is just getting into Flex. He kept getting this error:
[RPC Fault faultString="[MessagingError message='Unknown destination
'Coldfusion'.']" faultCode="InvokeFailed" faultDetail="Couldn't establish a
connection to 'Coldfusion'"]
This was his first attempt trying to hook Flex 2 into ColdFusion and he wasn't getting anywhere. His code looked ok to me:
<mx:RemoteObject id="cfService" destination="Coldfusion"
source="flexbtb.cfc.myService" />
But then I noticed something. He had "Coldfusion", not "ColdFusion". Turns out the destination value is case sensitive. Just one more example of something us ColdFusion developers have probably gotten a bit lazy with - case sensitivity.
Archived Comments
Something to be careful of to be sure in Flex. Another article talking about other case issues between flex and cf:
http://www.kylehayes.info/b...
I know that's tripped me up on many occasions, switching between cf, as and javascript on one project, especially when doing AJAX things involving going between cf and javascript numerous times. So I just use naming conventions anyways in cf, even though I know it doesn't matter, keeps me sharp.
Here is a blog post I wrote about another case sensitive problem CF Developers working in Flex might encounter:
http://www.brucephillips.na...
Also, make sure that your compiler path is set correctly inside of Flex Builder. When you import a new project Flex Builder will use the default path (local) to compile. I have ColdFusion 8 running locally (OSX) and had to set my compile path to
-context-root "" -services "/Applications/ColdFusion8/wwwroot/WEB-INF/flex/services-config.xml" -locale en_US
before the project would work.
Kai
Forgive me for raising the dead thread, but I just came across a problem that was tied into this one.
I'm creating a project using FDS that compiles on the server when the page is loaded. I'm getting the above error, however I'm using ColdFusion spelled in this case for the destination. When I try to view my compiler path, it says that "Since this project is compiled by the server, these settings do not apply."
So what can I do to get my remoteObject to connect to the ColdFusion destination?