1 Reply Latest reply on Mar 12, 2007 7:07 AM by Mr Pogo

    RemoteObject over Https

    Mr Pogo
      I’m at the end of my ropes with this one. We have built our website with Flex 2 and Coldfusion. When I first created the store that is part of the site it was separate and there wasn’t a problem with running everything in ssl. Now that the new site launched the store is now in the main site and I need to have the checkout process of the store work over ssl and the rest of the site to not be encrypted. I can’t get the RemoteObject to run over https. Everything works if I do it over http.

      I added a new destination to my services-config.xml and did a crossdomain.xml with the wildcard.

      Is it possible to access a remoting object via https even though the site is http? I know that in 1.5 there was a protocol but that’s gone now.


      Here is my services-config.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <services-config>

      <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>

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


      <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>
      <destination id="SecureColdFusion">
      <channels>
      <channel ref="securecfamf"/>
      </channels>
      </destination>

      </service>
      </services>

      <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="securecfamf" class="mx.messaging.channels.SecureAMFChannel">
      <endpoint uri="https://website2/flex2gateway/" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
      <properties>
      <serialization>
      <legacy-collection>true</legacy-collection>
      <legacy-map>true</legacy-map>
      <legacy-xml>true</legacy-xml>
      <legacy-throwable>true</legacy-throwable>
      </serialization></properties>

      </channel-definition>
      </channels>

      <logging>
      <target class="flex.messaging.log.ConsoleTarget" level="Error">
      <properties>
      <prefix>[Flex] </prefix>
      <includeDate>false</includeDate>
      <includeTime>false</includeTime>
      <includeLevel>false</includeLevel>
      <includeCategory>false</includeCategory>
      </properties>
      <filters>
      <pattern>Endpoint.*</pattern>
      <pattern>Service.*</pattern>
      <pattern>Configuration</pattern>
      <pattern>Message.*</pattern>
      </filters>
      </target>
      </logging>

      <system>
      </system>

      </services-config>

      And then the code from the remoteObject:
      <mx:RemoteObject destination="SecureColdFusion" id="dataManager" showBusyCursor="true" source="Inc.storeService">
      <mx:method name="getStoreItems" result="getItemResults(event)" />
      <mx:method name="getStoreItemsWithCode" result="getItemResults(event)" />
      </mx:RemoteObject>

      Here is the error I receive:
      [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed"]

      What am I missing?

      Thanks in advance,

      John Wahlen