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">
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With