0 Replies Latest reply on May 9, 2007 11:41 AM by Newsgroup_User

    Cannot Connect to Coldfusion with Flex 2

    Level 7
      I am attempting to call a coldfusion component using RemoteObject and I am
      getting the error where cannot communicate with Coldfusion.

      [RPC Fault faultString="[MessagingError message='Unknown destination
      'Coldfusion'.']" faultCode="InvokeFailed" faultDetail="Couldn't establish a
      connection to 'Coldfusion'"]

      I know everything is running correctly and the application and cfc is
      located in the coldfusion wwwroot.

      I have looked this up online and found many articles about it, but they all
      seem to be from Beta 2. The compiler solution is already done and I have
      editted the services-config.xml to include the path of my Cf server.

      CF is running just fine and I restarted both the coldfusion server and the
      flex builder 2 program after all the changes.

      Any ideas on where I can find information pertaining the released version of
      Flex 2?

      Here is my actual path to my application:
      C:\CFusionMX7\wwwroot\flexbtb\flex

      Here is my URL:
      http://localhost:8501/flexbtb/flex

      Here is the modified version of the services-config.xml file inside the
      coldfusion directory
      <?xml version="1.0" encoding="UTF-8"?>
      <services-config xmlns=" http://www.macromedia.com/2005/flex-service-config">

      <services>

      <service id="coldfusionsamples-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>
      <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>

      </service>

      </services>

      <security>

      <login-command class="flex.messaging.security.JRunLoginCommand"
      server="JRun"/>

      </security>

      <channels>

      <channel-definition id="my-cfamf" class="mx.messaging.channels.AMFChannel">
      <endpoint uri=" http://localhost:8501{context.root}/flex2gateway/"
      class="flex.messaging.endpoints.AMFEndpoint"/>
      <properties>
      <polling-enabled>false</polling-enabled>
      <serialization>
      <custom-deserializer type="typed-object"
      class="coldfusion.flash.messaging.io.amf.serializers.TypedObjectDeserializer"
      />
      </serialization>
      </properties>
      </channel-definition>
      </channels>
      <logging>

      <target class="flex.messaging.log.ConsoleTarget" level="Debug">
      <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>
      <locale>
      <default-locale>en</default-locale>
      <supported-locale>de</supported-locale>
      <supported-locale>fr</supported-locale>
      <supported-locale>es</supported-locale>
      </locale>

      <redeploy>
      <enabled>true</enabled>
      <watch-interval>20</watch-interval>
      <watch-file>{context.root}/WEB-INF/flex/flex-enterprise-services.xml</watch-file>
      <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
      </redeploy>
      </system>

      </services-config>
      --
      Wally Kolcz
      MyNextPet.org
      Founder / Developer
      586.871.4126