Reputation: 1565
I'm a ColdFusion developer looking to break into Flex. I have a couple test Flex applications Ii'm working on, but am having problem connecting to my CFCs. I've tried:
all to no avail.
Each time, I get the "Could not find the ColdFusion Component or Interface" error. What am I missing?
Here is how I'm invoking the CFC for Flex use.
<mx:RemoteObject id="conn" destination="ColdFusion" source="cfc.bulkmail"
result="orderGrid.dataProvider = event.result;" showBusyCursor="true">
Upvotes: 3
Views: 1227
Reputation: 13886
You can also go into your remoting-config.xml file ([coldfusionRoot]wwwroot\WEB-INF\flex) and enable the use of mappings on your coldfusion instance. By default Flex is not allowed to use mappings in locating a cfc instance.
<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>
what you see is the default. Change the use-mappings key to true and your mappings will now work.
Upvotes: 2
Reputation: 1565
C:\Coldfusion8\wwwroot\Gateway\CFC is the correct folder and the cfc.bulkmail is the correct source.
It works, I must've just not had the proper case at one point or the other.
But here's the answer for anyone who has the same problem in the future.
Upvotes: 0
Reputation: 10682
I had similar problems on certain servers. I think it has something to do with how security is setup on your website. I ended up taking the easy route and making my CFC methods remotely accessible and calling them as WebServices.
Upvotes: 0