我是一个ColdFusion开发人员,想要破解Flex。我有两个测试Flex应用程序,我正在工作,但有问题,连接到我的CFCs。我试过:
一切都没有结果。
每次,我都会收到“无法找到ColdFusion组件或接口”错误。我遗漏了什么?
下面是如何调用CFC来使用Flex。
<mx:RemoteObject id="conn" destination="ColdFusion" source="cfc.bulkmail"
result="orderGrid.dataProvider = event.result;" showBusyCursor="true">发布于 2009-04-21 14:32:23
C:\Coldfusion8\wwwroot\Gateway\CFC是正确的文件夹,cfc.bulkmail是正确的源。
起作用了,我一定是在某种程度上没有找到合适的情况。
但对于将来有同样问题的人来说,这是一个答案。
发布于 2009-04-21 17:26:25
您还可以进入远程-config.xml文件(coldfusionRootwwwroot\WEB\flex),并启用对coldfusion实例的映射。默认情况下,不允许Flex使用映射来定位cfc实例。
<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>你所看到的是默认的。将使用映射键更改为true,您的映射现在就可以工作了。
发布于 2009-04-21 14:25:45
我在某些服务器上也有类似的问题。我认为这与如何在您的网站上设置安全性有关。最后,我选择了一条简单的路线,并将我的CFC方法远程访问,并将它们称为WebServices。
https://stackoverflow.com/questions/772732
复制相似问题