remote cfc calls and this.mappings
I've recently started looking at the remote proxies feature of ColdSpring and found that you can't use this.mappings with remote cfc calls.
In my applications I like to make use of the per-app mappings capabilities of ColdFusion 8. However, unlike mappings set up in the CFIDE, these don't appear to be recognised when you use your cfcs for remote object calls.
If you are trying to use mappings set up in the CFIDE then you'll need to edit the use-mappings node of your services-config.xml file from false (the default) to true.
<use-mappings>true</use-mappings>
I also wrote a bit of code which I have in my onApplicationStart method to detect if the server I'm deploying to allows remote calls to use mappings.
<!---
------------------------------------------------------------------------------
Is ColdFusion configured to allow remote services to use mappings?
------------------------------------------------------------------------------
--->
<cfset servicesConfig = XmlSearch( XmlParse( "C:\ColdFusion8\wwwroot\WEB-INF\flex\services-config.xml"), "/services-config/services/service[@id='coldfusion-flashremoting-service']/destination[@id='ColdFusion']/properties/access/use-mappings" ) />
<cfif !servicesConfig[1].XmlText>
<cfthrow type="critical"
message="mappings disabled for remote services"
detail="Need to set '<use-mappings>true</use-mappings>' in 'C:\ColdFusion8\wwwroot\WEB-INF\flex\services-config.xml'" />
</cfif>
- Posted in:
- ColdFusion
- Coldspring


AS3
[RemoteClass (alias="com.whatever.whatever")]
CF
component alias="com.whatever.whatever" {}
so that I can use copies of the CF component in different apps so that I don't have to remap the alias of my AS3 class.
Currently seems you have to use the location of the cfc as its alias. This is a pain.
Thanks.
Comment by fosrias – October 08, 2010
Comment by John Whish – October 13, 2010