Changes in the XML configuration files for Flash Remoting in ColdFusion 9

For ColdFusion 9, the structure of the services-config.xml file has changed. These structural changes are:

  • A new <coldfusion> tag has been added under the <properties> in <channel-definition>, where the <access>, <use-accessor>, <use-implicit-accessors>, <use-structs>, and <property-case> tags are defined.

    In old ColdFusion 8 style remoting, these tags used to be present in the destination, defined in data-management-config.xml file.

  • Previously, the <serialization> tag included:

    <serialization> 
        <instantiate-types>false</instantiate-types> 
    </serialization>

    However, now you need to either set the <instantiate-types> to true or remove it from the services-config.xml file.

  • The <enable-small-messages> flag must be set to false under the serialization property.

    Note: In case you create custom channel definition on your client side by overriding the XML-based channel configurations, you still need to set “enableSmallMessages” flag to false. This is shown in the following code example:
    <mx:ChannelSet id="myChannelSet"> 
    <mx:channels> 
    <mx:AMFChannel enableSmallMessages="false" url="http://localhost:8500/flex2gateway/cfamfpolling" id="cfAMFPolling" pollingEnabled="true" pollingInterval="8"/> 
    </mx:channels> 
    </mx:ChannelSet>
  • In this release, the endpoint class names have been changed from the endpoint classes in ColdFusion 8. The following table provides a list of channel-definitions and their corresponding endpoint classes:

    Channel-definition ID

    ColdFusion 9 Endpoint Class

    ColdFusion 8 Endpoint Class

    my-cfamf

    coldfusion.flash.messaging.CFAMFEndPoint

    flex.messaging.endpoints.AMFEndpoint

    cf-polling-amf

    coldfusion.flash.messaging.CFAMFEndPoint

    flex.messaging.endpoints.AMFEndpoint

    my-cfamf-secure

    coldfusion.flash.messaging.SecureCFAMFEndPoint

    flex.messaging.endpoints.SecureAMFEndpoint

    cf-rtmp

    coldfusion.flash.messaging.CFRTMPEndPoint

    flex.messaging.endpoints.RTMPEndpoint

    Note: For LiveCycle Data Services ES, the cf-polling-amf and cf-rtmp channel definitions are used.
  • All the other files that need to be referenced from services-config.xml are now ‘included’ in services-config.xml.

In ColdFusion 8, the services-config.xml files looked similar to the following:

<channel-definition id="cf-polling-amf" class="mx.messaging.channels.AMFChannel"> 
<endpoint url="http://{server.name}:{server.port}{context.root}/ 
    flex2gateway/cfamfpolling" class="flex.messaging.endpoints.AMFEndpoint"/> 
            <properties> 
            <polling-enabled>true</polling-enabled> 
                <serialization> 
                    <instantiate-types>false</instantiate-types> 
                </serialization> 
            </properties> 
</channel-definition> 
 
<channel-definition id="cf-rtmp" class="mx.messaging.channels.RTMPChannel"> 
<endpoint url="rtmp://{server.name}:2048" class="flex.messaging.endpoints.RTMPEndpoint"/> 
<properties> 
    <idle-timeout-minutes>20</idle-timeout-minutes> 
        <serialization> 
            <!-- This must be turned off for any CF channel --> 
                <instantiate-types>false</instantiate-types> 
            </serialization> 
</properties> 
</channel-definition>

The new services-config.xml file looks similar to this:

<channel-definition id="cf-polling-amf "class="mx.messaging.channels.AMFChannel">  
<endpoint uri="http://{server.name}:{server.port}{context.root} 
/flex2gateway/cfamfpolling" class="coldfusion.flash.messaging.CFAMFEndPoint" /> 
<properties> 
    <polling-enabled>true</polling-enabled>  
    <polli ng-interval-seconds>8</polling-interval-seconds> 
    <serialization> 
        <enable-small-messages>false</enable-small-messages> 
    </serialization> 
    <coldfusion> 
        <access> 
            <use-mappings>true</use-mappings> 
            <method-access-level>remote</method-access-level> 
        </access> 
        <use-accessors>true</use-accessors> 
        <use-implicit-accessors>false</use-implicit-accessors> 
        <use-structs>false</use-structs> 
        <property-case> 
            <force-cfc-lowercase>false</force-cfc-lowercase> 
            <force-query-lowercase>false</force-query-lowercase> 
            <force-struct-lowercase>false</force-struct-lowercase> 
        </property-case> 
    </coldfusion> 
</properties> 
</channel-definition> 
<channel-definition id="cf-rtmp" class="mx.messaging.channels.RTMPChannel"> 
<endpoint uri="rtmp://{server.name}:2048" class="coldfusion.flash.messaging.CFRTMPEndPoint"/> 
    <properties> 
            <idle-timeout-minutes>20</idle-timeout-minutes> 
    <serialization> 
        <enable-small-messages>false</enable-small-messages> 
    </serialization> 
            <coldfusion> 
                <access> 
                    <use-mappings>true</use-mappings> 
                    <method-access-level>remote</method-access-level> 
                </access> 
                <use-accessors>true</use-accessors> 
                <use-implicit-accessors>false</use-implicit-accessors> 
                <use-structs>false</use-structs> 
                <property-case> 
                    <force-cfc-lowercase>false</force-cfc-lowercase> 
                    <force-query-lowercase>false</force-query-lowercase> 
                    <force-struct-lowercase>false</force-struct-lowercase> 
                </property-case> 
            </coldfusion> 
    </properties> 
</channel-definition>