0 Replies Latest reply on Aug 18, 2008 1:04 PM by EvolvedDSM

    Any way to connect AIR to a ColdFusion dataservice?

    EvolvedDSM Level 2
      I've created a few apps that use the Web development side of Flex 3 to connect to my ColdFusion server via a dataservice call using a destination set up in data-management-config.xml. I wanted to try my luck with creating an AIR app that has the same connectivity -- however it does not work using the config that my web apps are using. Anyone have a clue how to use CF with AIR? I can use remoteObject to use CFCs to handle my data, but using a dataservice seems much less clunky.

      data-management-config:
      <adapters>
      <adapter-definition id="coldfusion-dao" class="coldfusion.flex.CFDataServicesAdapter"/>
      </adapters>

      <destination id="recepds">
      <adapter ref="coldfusion-dao"/>
      <channels>
      <channel ref="cf-dataservice-rtmp"/>
      <channel ref="cf-polling-amf"/>
      </channels>
      <properties>
      <component>recepair.cfcs.todayTableAssembler</component>
      <scope>request</scope>
      <access>
      <method-access-level>remote</method-access-level>
      </access>
      <metadata>
      <identity property="logID"/>
      </metadata>
      </properties>
      </destination>

      Coldfusion channels in services-config:
      <!-- ColdFusion specific RTMP channel -->
      <channel-definition id="cf-dataservice-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>

      <!-- ColdFusion specific HTTP channel -->
      <channel-definition id="cf-polling-amf" class="mx.messaging.channels.AMFChannel">
      <endpoint url=" http://{server.name}:{server.port}/{context.root}/messagebroker/cfamfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
      <properties>
      <serialization>
      <!-- This must be turned off for any CF channel -->
      <instantiate-types>false</instantiate-types>
      </serialization>
      <polling-enabled>true</polling-enabled>
      <polling-interval-seconds>8</polling-interval-seconds>
      </properties>
      </channel-definition>

      Is this the wrong configuration for Flex AIR?