Expand my Community achievements bar.

Deployed Flex application not using secure Coldfusion Channel

Avatar

Level 2

I have a flex application that is using the secure coldfusion channel in development, and it works fine.  I checked it through firebug and it's definitely calling the https URL for the flexgateway.  I am using the -services option in the compiler to use the services-config.xml.

When I move the flex application to the production machine, for some reason it reverts to using the non secure channel with the http protocol.  I tried a clean project build, but it still happens.  Below I'm posting my services-config and remote-config files to see if anyone can figure out anything.  Thanks, Jim.

remoting-config.xml:

<adapters>
        <adapter-definition id="cf-object" class="coldfusion.flash.messaging.ColdFusionAdapter" default="true"/>
        <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter"/>
    </adapters>

    <default-channels>
        <channel ref="my-cfamf-secure"/>
    </default-channels>

    <destination id="ColdFusion">
        <channels>
            <channel ref="my-cfamf-secure"/>
        </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>true</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>

services-config.xml:

<channel-definition id="my-cfamf-secure" class="mx.messaging.channels.SecureAMFChannel">
            <endpoint uri="https://{server.name}:{server.port}{context.root}/flex2gateway/cfamfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
            <properties>
                <add-no-cache-headers>false</add-no-cache-headers>
                <polling-enabled>false</polling-enabled>
                <serialization>
                    <instantiate-types>false</instantiate-types>
                </serialization>
            </properties>
        </channel-definition>

1 Reply

Avatar

Level 2

I figured out the problem.  You have to Export the release build for the project and use that version of the swf.  I was using the version built by default when you work on the project.  Don't quite know what the difference is, but it works now.