After reading this thread and successfully using to to get SSL running, I thought I would post my cf XML settings.

Web.xml
I left the /flex2gateway/* unchanged from the default install:
<servlet-mapping id="macromedia_mapping_0">
                <servlet-name>MessageBrokerServlet</servlet-name>
        <url-pattern>/flex2gateway/*</url-pattern>
</servlet-mapping>

I had to edit the MessageBrokerServlet settings in web.xml to point at the correct xml file.  The default install does not do this:
<servlet>
  <servlet-name>MessageBrokerServlet</servlet-name>
  <servlet-class>coldfusion.bootstrap.BootstrapServlet</servlet-class>
    <init-param>
      <param-name>servlet.class</param-name>
      <param-value>flex.messaging.MessageBrokerServlet</param-value>
      <param-name>services.configuration.file</param-name>
      <!-- this is the default value istalled by CF.  But this file
           does not exist (st, 2006/10/19) -->
      <!--
      <param-value>
        /WEB-INF/flex/flex-enterprise-services.xml
      </param-value>
      -->
      <param-value>/WEB-INF/flex/flex-services.xml</param-value>
    </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>


The real work began in C:\CFusionMX7\wwwroot\WEB-INF\flex\services-config.xml

Even though I have multiple channels defined, it seems to make no difference if they are referenced here or not.  Referencing Peter's post, it seems that additional channels are only used for fail-over situations.
    <services>
        <service id="coldfusion-flashremoting-service"
                 class="flex.messaging.services.RemotingService"
                 messageTypes="flex.messaging.messages.RemotingMessage">

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

            <destination id="ColdFusion">
                <channels>
                    <channel ref="my-cfamf"/>
                </channels>

In the channels section, I define three URL patterns:
http://site/flex2gateway (keep the old apps running)
http://site/flex2gateway/amf
https://site/flex2gateway/secureamf  (Note that this uses SecureAMFChannel and SecureAMFEndpoint.   Thanks to Lin Lin @ http://weblogs.macromedia.com/lin/archives/2006/08/flex_app_works.cfm )

    <channels>
        <channel-definition id="my-cfamf" class="mx.messaging.channels.AMFChannel">
            <endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/" class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>false</polling-enabled>
                <serialization>
                    <instantiate-types>false</instantiate-types>
                </serialization>
            </properties>
        </channel-definition>

        <channel-definition id="new-cfamf" class="mx.messaging.channels.AMFChannel">
            <endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/amf/" class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>false</polling-enabled>
                <serialization>
                    <instantiate-types>false</instantiate-types>
                </serialization>
        <add-no-cache-headers>false</add-no-cache-headers>
            </properties>
        </channel-definition>

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

    </channels>

Restart CF, and everything seems to work.  Hopefully, this will save somebody a few hours.


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to