Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8137731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:15:09+00:00 2026-06-06T11:15:09+00:00

When I try to call this simple function in a CFC, with the proper

  • 0

When I try to call this simple function in a CFC, with the proper remote setting, I get an error that says

“Destination ‘ColdFusion’ either does not exist or the destination has no channels defined and the application does not define any default channels.”

This is the CFC, although I am 99% certain the problem does not exist with it, very simple.

<cfcomponent output="false">

    <!--- Get Server Time --->
    <cffunction name="getServerTime" access="remote" returnType="string">
       <cfreturn now() />
    </cffunction>

    <cffunction name="getString" access="remote" returnType="string">
        <cfreturn "hello......" />
    </cffunction>

</cfcomponent>

This is the main.mxml file which includes the remote call

<?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" viewSourceURL="srcview/index.html" applicationComplete="init()">

<mx:Script>
    <![CDATA[
        import mx.rpc.events.ResultEvent;
        import mx.controls.Alert;

        public function init():void{
          Alert.show(conn.getString());
        }

        public function eventResultHandler(event:ResultEvent):void{
            lblStringResult.text = event.result as String;                 
        }

    ]]>
</mx:Script>

<mx:RemoteObject id="conn" destination="ColdFusion" source="DemoCFC"
    result="eventResultHandler(event)" showBusyCursor="true" >
</mx:RemoteObject>


<mx:Label id="lblStringResult" y="10" horizontalCenter="0"/> 

<mx:Button label="Server Time?.." click="conn.getServerTime();" y="36" horizontalCenter="0" />

</mx:Application>

This is the services-services.xml file in the root of WEB-INF\flex folder. I apologize for this long and tedious file, but I think the problem could be in it.

<services>
    <service-include file-path="remoting-config.xml" />
    <service-include file-path="proxy-config.xml" />
    <service-include file-path="messaging-config.xml" />
</services>

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

</security>

<channels>

    <!--  CF Based Endpoints -->
    <!-- {server.name}:{server.port}{context.root} -->
    <channel-definition id="my-cfamf" class="mx.messaging.channels.AMFChannel">
        <endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/" class="coldfusion.flash.messaging.CFAMFEndPoint"/>
        <properties>
            <polling-enabled>false</polling-enabled>
            <serialization>
                <enable-small-messages>false</enable-small-messages>
            </serialization>
            <coldfusion>
                <!-- define the resolution rules and access level of the cfc being invoked -->
                <access>
                    <!-- Use the ColdFusion mappings to find CFCs-->
                    <use-mappings>true</use-mappings>
                    <!-- allow "public and remote" or just "remote" methods to be invoked -->
                    <method-access-level>remote</method-access-level>
                </access>

                <use-accessors>true</use-accessors>

                <use-structs>false</use-structs>

                <serialize-array-to-arraycollection>false
                </serialize-array-to-arraycollection>

                <proxy-load-method>loadProxy</proxy-load-method>

                <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>
            </coldfusion>
        </properties>
    </channel-definition>

    <channel-definition id="cf-polling-amf" class="mx.messaging.channels.AMFChannel">
        <endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/cfamfpolling" class="coldfusion.flash.messaging.CFAMFEndPoint"/>
        <properties>
            <polling-enabled>true</polling-enabled>
            <polling-interval-seconds>8</polling-interval-seconds>
            <serialization>
                <enable-small-messages>false</enable-small-messages>
            </serialization>
            <coldfusion>
                <!-- define the resolution rules and access level of the cfc being invoked -->
                <access>
                    <!-- Use the ColdFusion mappings to find CFCs-->
                    <use-mappings>true</use-mappings>
                    <!-- allow "public and remote" or just "remote" methods to be invoked -->
                    <method-access-level>remote</method-access-level>
                </access>

                <use-accessors>true</use-accessors>

                <use-structs>false</use-structs>

                <serialize-array-to-arraycollection>false
                </serialize-array-to-arraycollection>

                <proxy-load-method>loadProxy</proxy-load-method>

                <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>
            </coldfusion>
        </properties>
    </channel-definition>

    <channel-definition id="my-cfamf-secure" class="mx.messaging.channels.SecureAMFChannel">
        <endpoint uri="https://{server.name}:{server.port}{context.root}/flex2gateway/cfamfsecure" class="coldfusion.flash.messaging.SecureCFAMFEndPoint"/>
        <properties>
            <polling-enabled>false</polling-enabled>
            <add-no-cache-headers>false</add-no-cache-headers>
            <serialization>
                <enable-small-messages>false</enable-small-messages>
            </serialization>
            <coldfusion>
                <!-- define the resolution rules and access level of the cfc being invoked -->
                <access>
                    <!-- Use the ColdFusion mappings to find CFCs-->
                    <use-mappings>true</use-mappings>
                    <!-- allow "public and remote" or just "remote" methods to be invoked -->
                    <method-access-level>remote</method-access-level>
                </access>

                <use-accessors>true</use-accessors>
                <use-structs>false</use-structs>

                <serialize-array-to-arraycollection>false
                </serialize-array-to-arraycollection>

                <proxy-load-method>loadProxy</proxy-load-method>

                <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>
            </coldfusion>
        </properties>
    </channel-definition>

    <!--  Java Based Endpoints -->
    <channel-definition id="java-amf" class="mx.messaging.channels.AMFChannel">
        <endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
    </channel-definition>

    <channel-definition id="java-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
        <endpoint uri="https://{server.name}:{server.port}{context.root}/flex2gateway/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
    </channel-definition>

    <channel-definition id="java-polling-amf" class="mx.messaging.channels.AMFChannel">
        <endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
        <properties>
            <polling-enabled>true</polling-enabled>
            <polling-interval-seconds>8</polling-interval-seconds>
        </properties>
    </channel-definition>

</channels>

<logging>
    <target class="flex.messaging.log.ConsoleTarget" level="Error">
        <properties>
            <prefix>[BlazeDS] </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>
    <manageable>false</manageable>
</system>

This is the remoting-config.xml file.

<?xml version="1.0" encoding="UTF-8"?>

<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"/>
</default-channels>

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

When the main.mxml file compiles and runs, the call to the init() method, which is using the remote object connection to call the getString() method, returns and displays

“[object AsyncToken]” in the Alert box.

If I click on the button, I’m calling the method getServerTime() and trying to display the server time in the mxml label, but only get the

If I browse to , I get a white page. That is supposedly is a good thing according to some threads I came across, trying to resolve this problem.

The main.mxml file and the cfc are in the same folder in the project. So I know the Remote call is finding the cfc.

I am pretty sure the problem is in the configuration of ColdFusion, since this is such a simple request.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T11:15:10+00:00Added an answer on June 6, 2026 at 11:15 am

    The XML file you have above is the services-config.xml but you set your destination in the remoting-config.xml file … see below:

    <service id="remoting-service" class="flex.messaging.services.RemotingService">
    <adapters>
        <adapter-definition id="cf-object" class="railo.runtime.net.flex.RailoAdapter" default="true"/>
        <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter"/>
    </adapters> 
    <default-channels>
        <channel ref="my-cfamf"/>
        <channel ref="classic-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>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>
    </service>
    

    Check through this file in your WEB-INF/flex folder and ensure that you have a ColdFusion destination set and that it sets the appropriate channel to be used from your services-config.xml file that you have above.

    And sorry for the long response, but thought I’d post my service-config.xml file so you can see how they work together:

    <services-config>
    
    <services>
        <service-include file-path="remoting-config.xml" />
        <service-include file-path="proxy-config.xml" />
        <service-include file-path="messaging-config.xml" />        
    </services>
    
    <security>
        <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
    </security>
    
    <channels>
    
        <!-- CF -->
        <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="classic-cfamf" class="mx.messaging.channels.AMFChannel">
            <endpoint uri="http://{server.name}:{server.port}{context.root}/flashservices/gateway/" class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>false</polling-enabled>
                <serialization>
                    <instantiate-types>false</instantiate-types>
                </serialization>
            </properties>
        </channel-definition>
    
        <channel-definition id="cf-polling-amf" class="mx.messaging.channels.AMFChannel">
            <endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/cfamfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>true</polling-enabled>
                <polling-interval-seconds>8</polling-interval-seconds>
                <serialization>
                    <instantiate-types>false</instantiate-types>
                </serialization>
            </properties>
        </channel-definition>
    
        <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>
                <polling-enabled>false</polling-enabled>
                <add-no-cache-headers>false</add-no-cache-headers>
                <serialization>
                    <instantiate-types>false</instantiate-types>
                </serialization>
            </properties>
        </channel-definition>
    
        <!-- Java -->
        <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
        </channel-definition>
    
        <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
            <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
            <properties>
                <add-no-cache-headers>false</add-no-cache-headers>
            </properties>
        </channel-definition>
    
        <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>true</polling-enabled>
                <polling-interval-seconds>4</polling-interval-seconds>
            </properties>
        </channel-definition>
    
        <channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">
          <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure/streamingamf" class="flex.messaging.endpoints.StreamingAMFEndpoint" /> 
          <properties>
            <idle-timeout-minutes>0</idle-timeout-minutes> 
            <max-streaming-clients>100</max-streaming-clients> 
            <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis> 
            <user-agent-settings>
              <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="5" /> 
              <user-agent match-on="Firefox" kickstart-bytes="2048" max-streaming-connections-per-session="5" /> 
              <user-agent match-on="Safari" kickstart-bytes="2048" max-streaming-connections-per-session="5" />
              <user-agent match-on="Opera" kickstart-bytes="2048" max-streaming-connections-per-session="5" />  
            </user-agent-settings>
          </properties>
        </channel-definition>
    
        <channel-definition id="java-http" class="mx.messaging.channels.HTTPChannel">
            <endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
        </channel-definition>
    
        <channel-definition id="java-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
            <endpoint uri="https://{server.name}:{server.port}{context.root}/flex2gateway/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
        </channel-definition>
    </channels>
    
    <logging>
        <target class="flex.messaging.log.ConsoleTarget" level="Error">
            <properties>
                <prefix>[BlazeDS] </prefix>
                <includeDate>false</includeDate>
                <includeTime>false</includeTime>
                <includeLevel>false</includeLevel>
                <includeCategory>false</includeCategory>
            </properties>
            <filters>
                <pattern>Endpoint.*</pattern>
                <pattern>Service.*</pattern>
                <pattern>Configuration</pattern>
            </filters>
        </target>
    </logging>
    
    <system>
        <redeploy>
            <enabled>false</enabled>
        </redeploy>
    </system>
    
    </services-config>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this error when i try to call this function in Chrome 16.0.912.77
whenever I try to call my ejb from a client, I get this error
I keep getting this error when I try to call Find() public void findTxt(string
I have this static callback function in MyClass, and I try to call another
When I try to call any GL15 function in lwjgl I get A NullPointerException.
I am trying to write a simple function that will get me a number
In this VB.NET code: Dim o as SomeClass Try o = new SomeClass 'call
I try to call a function which passed as function pointer with no argument,
Update getting error when i try to call the method from Activity: SQLiteDatabase db
Hi I'm using c++ and libpcap. When I try to call the function mycallback

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.