Flex Data Server and CF Flash Remoting together
A common configuration question with Flex2 developers who are trying to use the Flex Data Server and CF is "How do I use FDS and Flash Remoting calls with CF, in the same app?". The reason this gets confusing is because both Flex and CF have their own version of the services-config.xml file, and you can only point to one file in your flex builder project. So which one do you use?
First off, do not try to merge the CF and Flex2 servers into the same instance. In other words if you find yourself trying to merge the web.xml files, like you did with CF and Flex 1.5 - STOP! Don't do it. You don't need to do it with flex2. Instead you want set up your servers and your project like this.
1) Configure CF on 1 instance/server
2) Configure FDS on 2nd instance/server
3) Point your project at the services-config.xml in the FDS instance.
Ok at this point you can easily call FDS destinations which uses CF (or not). Now to also make Flash remoting requests to CF.
4) Define the destination and channel with Actionscript, instead of letting the compiler do it when it is pointed at the CF version of the services-config.xml
To create you own ChannelSet the code would look something like this.
public function initApp()
{
cSet = new ChannelSet();
var customChannel:Channel = new AMFChannel("my-cfamf", http://localhost:8500/flex2gateway/);
// Add the Channel to the ChannelSet. cSet.addChannel(customChannel);
foo.channelSet = cSet;
}
<mx:RemoteObject
id="foo"
destination="ColdFusion"
source="com.foo.component" />

Many of us were stuck how to implement this without having FDS throwing errors all over.
Thank you, thank you, thank you!
I setup the two instances (fds,cf) and pointed my project at the services-config.xml in the fds instance but I cannot seem to call any cfc in the cf instance. I am just trying to get something simple working like a helloworld.
Nick
Also Start both servers from the command line, that way you can see if there are any errors during startup.
If you want to call CF with Flash Remoting, then you need to point to the FDS services-config.xml. But you need to define the endpoint url and channel in your code directly. (instead of letting flex pull it out of the services-config.xml).
hth
Thanks,
Ryan
The test.cfm dumps OK, which is a start. See http://208.106.227.101/Phones/bin/CF/test.cfm
But the "Phones" app itself just shows a blank grey screen after the initializing bar finishes loading. See http://208.106.227.101/Phones/bin/phones.html
If anybody can work with me to get this going, I'd appreciate it. Name your price! I have documented every step of what I have done so far including screen shots of all path entries etc in FlexBuilder2. From this, somebody might be able to see where I'm going wrong.
Email me at xxxchinabuy01@yahoo.comxxx. (Remove three x's from each end first).
Paul
does that answer you question?
public function initApp()
{
cSet = new ChannelSet();
var customChannel:Channel = new AMFChannel("my-cfamf", http://localhost:8500/flex2gateway/);
// Add the Channel to the ChannelSet. cSet.addChannel(customChannel);
foo.channelSet = cSet;
}
however, taking a guess I think I see the confusion, you said
>Well we're now defining the channel in as. not in service-config, right?
that is wrong. We still have to define the channel in the services-config.xml. So the server will work correctly. This is just a different way to link the client to it. What my code is doing for you is removing the requirement to link the client to the services-config.xml in the compiler arguments. And allows you to change the url or path at runtime, which is not allowed with the standard -services compiler argument (which is how all of the docs explain it).
All of the settings in the services-config.xml are used by the server to operate properly. So they still need to be defined. All the client cares about is what url do I use to access the server. Why the flex team decided to use the same file for the client configuration and server configuration is what causes all of the headaches (especially if your not developing locally).
boybels
"Could not pre-load servlet: MessageBrokerServlet flex.messaging.config.ConfigurationException: channel not found for reference 'my-cfamf' in destination 'ColdFusion'..." error when starting FDS.
Following is the code I pasted between the <sevices></services> tags. What am I doing wrong??
Boybles
<service id="coldfusionsamples-service"
class="flex.messaging.services.RemotingService"
messageTypes="flex.messaging.messages.RemotingMessage">
<adapters>
<adapter-definition id="cf-object" class="coldfusion.flash.messaging.ColdFusionAdapter" default="true"/>
</adapters>
<destination id="ColdFusion">
<channels>
<channel ref="my-cfamf"/>
</channels>
<properties>
<source>*</source>
<!-- define the resolution rules and access level of the cfc being invoked -->
<access>
<!-- Use the ColdFusion mappings to find CFCs, by default only CFC files under your webroot can be found. -->
<use-mappings>false</use-mappings>
<!-- allow "public and remote" or just "remote" methods to be invoked -->
<method-access-level>remote</method-access-level>
</access>
<property-case>
<!-- cfc property names -->
<force-cfc-lowercase>false</force-cfc-lowercase>
<!-- Query column names -->
<force-query-lowercase>false</force-query-lowercase>
<!-- struct keys -->
<force-struct-lowercase>false</force-struct-lowercase>
</property-case>
</properties>
</destination>
</service>
How can I help it find he adapter??
thanks,
boybles
http://www.rpg-trader.com/world_of_warcraft/1.php
http://www.rpg-trader.com/warhammer_online/1.php
http://www.rpg-trader.com/everquest/1.php
http://www.rpg-trader.com/final_fantasy_xi/1.php
[url=http://www.lszwjx.com]????[/url] [url=http://www.lszwjx.com]?????[/url] [url=http://www.lszwjx.com/news.htm]?????,??/?????[/url] [url=http://www.ruian2machine.cn]?????[/url] [url=http://www.yszdh.com]runescape money[/url] [url=http://www.yszdh.com]rs2 money[/url] [url=http://www.mmosgames.com]dofus kamas[/url] [url=http://www.plastic-thermoforming-machine.com/product.htm]thermoforming Equipment[/url] [url=http://www.packagemachinery.cn]bag making machine[/url] [url=http://www.todesign.com.cn]????[/url] [url=http://www.shdyf.com]????[/url] [url=http://www.tzonegroup.cn]??[/url] [url=http://www.tzonegroup.cn/about.asp]??????[/url] [url=http://www.tzonegroup.cn/products.asp]???[/url] [url=http://www.rajayj.cn]???[/url] [url=http://www.rajayj.cn]?????[/url] [url=http://www.ashuashi.com.cn]????[/url]
[url=http://www.gowowpowerleveling.com]power leveling[/url] [url=http://www.gowowpowerleveling.com]wow power leveling[/url] [url=http://www.zhongke-china.com]paper box making lines[/url] [url=http://www.zhongke-china.com]rigid paper box making lines[/url] [url=http://www.zhongke-china.com]paper box making machinery[/url] [url=http://www.zhongke-china.com]rigid paper box making machinery[/url] [url=http://www.zhongke-china.com]paper box forming machinery[/url] [url=http://www.zhongke-china.com]rigid paper box forming machinery[/url] [url=http://www.zhongke-china.com/about.asp]rigid paper box equipment[/url] [url=http://www.zhongke-china.com/about.asp]paper box equipment[/url] [url=http://www.plastic-thermoforming-machine.com]thermoforming machine[/url] [url=http://www.plastic-thermoforming-machine.com]thermoforming Equipment[/url] [url=http://www.plastic-thermoforming-machine.com]Plastic Machinery[/url] [url=http://www.plastic-thermoforming-machine.com]Plastic Thermoforming Machine[/url] [url=http://www.plastic-thermoforming-machine.com/product.htm]Plastic Thermoforming Machinery[/url] [url=http://www.plastic-thermoforming-machine.com/product.htm]Plastic Sheet Unit,Plastic Extruding Machine[/url] [url=http://www.plastic-thermoforming-machine.com/about.htm]Plastic Machine[/url] [url=http://www.66773388.com/xw_160.htm]prada shoes[/url] [url=http://www.66773388.com/xw_159.htm]true religion jeans[/url] [url=http://www.66773388.com/xw_158.htm]evisu jeans[/url] [url=http://www.66773388.com/xw_157.htm]Ed hardy[/url] [url=http://www.66773388.com/xw_156.htm]Gucci shoes[/url] [url=http://www.66773388.com/xw_155.htm]Gucci Handbag[/url] [url=http://www.66773388.com/xw_151.htm]adidas shoes[/url] [url=http://www.66773388.com/xw_150.htm]Ugg Boots[/url] [url=http://www.66773388.com/xw_146.htm]nike shoes[/url] [url=http://www.66773388.com/xw_143.htm]LV handbags[/url] [url=http://www.66773388.com/xw_147.htm]Jordan shoes[/url] [url=http://www.66773388.com/xw_144.htm]new era caps[/url]
[url=http://www.wzbtjx.cn]????[/url] [url=http://www.wzbtjx.cn]?????[/url] [url=http://www.wzbtjx.cn]???????[/url] [url=http://www.wzbtjx.cn]???????[/url] [url=http://www.wzbtjx.cn/news.htm]???????[/url] [url=http://www.wzbtjx.cn/news.htm]???[/url] [url=http://www.wzbtjx.cn/about.htm]???[/url] [url=http://www.wzbtjx.cn/product.htm]??????[/url] [url=http://www.jinggong.cc]???[/url]
http://www.tumeroks.com
http://war.tumeroks.com
http://www.rpg-trader.com/everquest/1.php
http://www.rpg-trader.com/final_fantasy_xi/1.php
http://www.rpg-trader.com/warhammer_online/1.php
http://www.rpg-trader.com/lineage_2/1.php
http://wow.tumeroks.com
http://diablo3.tumeroks.com
http://starcraft2.tumeroks.com
http://www.wowgoldguide.com
http://www.buyingwowgold.com
http://www.everquestplatinumguide.com
http://www.cheapwargold.net
http://www.warprofessionguide.com
http://www.cheapwarhammergold.net
http://www.warmacros.com
http://www.warquestguide.com
http://www.warprofessions.com
http://www.warlevelingguide.com
http://www.ffxigilguide.com
http://www.wartradeskills.com
http://www.warhammertradeskills.com
http://www.warhammergoldguide.com
http://www.wargoldfarming.com
http://www.warhammergoldforsale.com
http://www.wowquestguide.com
http://www.wargoldtips.com
http://www.wargoldfarmingguide.com
http://www.freewargoldguide.com
http://www.lineage2adenaguide.com
http://www.wargoldforsale.com
http://www.1000wowgold.com
http://www.worldofwarcraftexploits.com
http://www.farmworldofwarcraftgold.com
http://www.worldofwarcraftgoldfarming.com
http://www.everquest2goldguide.com
http://www.aocquestguide.com
http://www.aocgoldfarming.com
http://www.diablo2store.com
http://www.ddogold.co.uk
http://www.ddogoldguide.com
http://www.daocplatguide.com
<P><A href="http://www.game4power.com/">buy wow gold</A></P>
Massive also said today that it would be extending its aforementioned deal with Activision to encompass an additional 18 games appearing on the Xbox 360 and PC.<P><A href="http://www.wowgoldone.com/">cheap wow gold</A></P>The agency didn't fully delineate which would fall under this deal, though it did call out Guitar Hero: World Tour, James Bond: Quantum of Solace, and Transformers: Revenge of the Fallen,<P><A href="http://www.itemstores.com/">buy wow items</A></P> as well as games in its Tony Hawk and AMAX Racing franchises.Shortly before Activision and Vivendi announced their deal of the decade,<P><A href="http://www.gamelevelup.com/">wow power leveling</A></P> the Guitar Hero publisher signed on to receive in-game advertisements from Massive Inc for a number of its Xbox 360 and PC games. A bit more than a year later, Massive is now extending its reach to Activision's new power player, Blizzard Entertainment.<P><A href="http://www.game4power.com/">buy wow gold</A></P> from our site ,you'll get more surprises!
<P><A href="http://www.game4power.com/">buy wow gold</A></P>
Massive also said today that it would be extending its aforementioned deal with Activision to encompass an additional 18 games appearing on the Xbox 360 and PC.<P><A href="http://www.wowgoldone.com/">cheap wow gold</A></P>The agency didn't fully delineate which would fall under this deal, though it did call out Guitar Hero: World Tour, James Bond: Quantum of Solace, and Transformers: Revenge of the Fallen,<P><A href="http://www.itemstores.com/">buy wow items</A></P> as well as games in its Tony Hawk and AMAX Racing franchises.Shortly before Activision and Vivendi announced their deal of the decade,<P><A href="http://www.gamelevelup.com/">wow power leveling</A></P> the Guitar Hero publisher signed on to receive in-game advertisements from Massive Inc for a number of its Xbox 360 and PC games. A bit more than a year later, Massive is now extending its reach to Activision's new power player, Blizzard Entertainment.<P><A href="http://www.game4power.com/">buy wow gold</A></P> from our site ,you'll get more surprises!