ColdFusion 8: Mappings

One common issue when CFers start using Flex with remoting is when they store cfcs somewhere else than the webroot and create a mapping. The flex application will start complaining that the CFC or interface could not be found. To fix this, you just need to change the property to true in the remoting-config.xml that can be found under the {cfusion-app}/WEB-INF/flex/ folder when using CF8 with integrated LCDS or services-config.xml in the same folder when not installed with LCDS.

In my opinion this should be set to true by default since when connecting to LCDS it will always use any mappings set in the admin.

If you enable and use cf-rtmp channel for your data-management destinations, you should be aware that the CF server will try to find your components only under the ColdFusion webroot. This is because through rtmp, CF is not aware where your webserver webroot folder is stored.

You can fix this easily by adding a mapping under the administrator to point to the right direction.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Great tip! Love the banner on your website, looks great. I am new to flex and in the middle of learning ActionScript3. Do you know of any basic tutorials or resources showing examples of applications connecting to flex? Keep the great posts coming!
# Posted By Dan Vega | 7/12/07 11:37 PM
Hi Dan,

There aren't much tutorials regarding cf+flex integration but you can always take a look to http://www.cflex.net . If you have any specific problem and would like to see it covered, just send me an email to joaopedromartinsfernandes [youKnowWhatToPutHere ] gmail.com
# Posted By João Fernandes | 7/13/07 2:25 AM
I've always added virtual mappings in the jrun-web.xml file (running CF on JRUN) manually and never had any problems.
Looks something like this:
<virtual-mapping>
<resource-path>/services/*</resource-path>
<system-path>D:/services</system-path>
</virtual-mapping>

All my cfc's go in subfolders in D:/services. Never had any problems with that approach.
# Posted By Muzak | 7/13/07 6:10 PM
Yes Musak,

that will also work. I mentioned the most common way of doing it, not the only way :)
# Posted By João Fernandes | 7/17/07 5:45 PM
I've came across a strange problem in processing remoteObject with ColdFusion 8. FF2 and IE 7 are processing this page: http://aregak.beforego.info/index.cfm?objectid=DA3...
great.
At a same time Opera 9 and IE6 are getting this strange error:

FaultCode: Client.Error.MessageSend
FaultString: "Send failed"
NetConnection.Call.Failed: HTTP:Failed:url:'http://aregak.beforego.info:80/flex2gateway'"
Did you face a problem like this?
Thanks,
Mika
# Posted By Mickael | 1/18/08 4:24 AM
Great tip! Love the banner on your website, looks great. That will also work. Keep the great posts coming!

Andrzej Filipowicz
http://www.andrzejfilipowicz.com
Still life Artist, still life art
http://life.e-phils.com/
STILL LIFE PAINTING
# Posted By Still life Artist | 1/23/08 1:53 PM
I am getting the same error as Mickael. I recently upgraded a server to CF8 and now all the Flex2 apps I made (while on CF7) dont' work (error same as above). I have tried recompiling the apps with the new CF8 mapping, but no luck.
Any ideas?

Thanks,
Mike
# Posted By mike | 1/23/08 1:56 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001. Design by dcarter.