Flex/ColdFusion case sensitivity gotcha

This post is more than 2 years old.

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.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by Kyle Hayes posted on 5/16/2007 at 6:03 PM

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...

Comment 2 by Raymond posted on 5/16/2007 at 6:52 PM

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.

Comment 3 by Bruce posted on 5/17/2007 at 1:40 AM

Here is a blog post I wrote about another case sensitive problem CF Developers working in Flex might encounter:

http://www.brucephillips.na...

Comment 4 by Kai Pradel posted on 12/3/2007 at 9:32 PM

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

Comment 5 by Tony Eckert posted on 5/15/2008 at 8:28 PM

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?