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

Everything is default. CFMX 7.0.2 Multiserver on IIS DevNet Edition for
Development on one machine. FlexBuilder2 on my workstation machine. A
drive mapping to the webroot and to the JRun4 folder. My Flex Project is
configured and successfully validated to the root folder at 
J:\servers\cfusion\cfusion-ear\cfusion-war.

Compiler in FlexBuilder 2 is comfigured with this: -services
"J:\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\flex\services-config\
.xml" -locale en_US

This is as basic as it gets - I am trying to get a HelloWorld app (from
lynda.com actually) working with Flex 2 and CF via Remoting on a
remoteCF Development Server. Can this work or is there a bug with Flex
2which requires that CF be loaded locally for development?

If anyone is successfully developing Flex 2 apps with a remote
Coldfusion server, I would appreciate it if you could walk me through
the setup steps.  Below are more details of what I've done so far.

-------------------------------------

I have taken the time to read past entries on this topic, but the issues
were slightly different than mine and didn't offer enough of a solution
to help resolve my issue.

In my HelloFromColdfusion.mxml file is the following code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="vertical">

     <mx:RemoteObject id="cfService"
         destination="Coldfusion"
         source="flex2btb.cfc.MyService"/>

     <mx:Button label="Call Coldfusion" click="cfService.helloWorld()"/>

     <mx:Label text="{cfService.helloWorld.lastResult}" fontSize="18"/>
</mx:Application>

In a subdirectory in the webroot called flex2btb, in the flex directory
is MyService.cfc. I have the crossdomain.xml file in my webroot also.
The code is very basic:

<cfcomponent extends="Service">

     <cffunction name="helloWorld" access="remote" returntype="string">
         <cfreturn "Hello World from Coldfusion">
     </cffunction>
</cfcomponent>

BTW, I get the blank white screen when I browse to
http://www.[mydomainhere].com/flex2gateway.

I get this error when I run the app at 
http://www.[mydomainhere].com/flex2btb/flex/HelloFromColdFusion.html:

[RPC Fault faultString="[MessagingError message='Unknown destination
'Coldfusion'.']" faultCode="InvokeFailed" faultDetail="Couldn't
establish a connection to 'Coldfusion'"]
     at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::invo\
ke()
     at
mx.rpc.remoting.mxml::Operation/http://www.adobe.com/2006/flex/mx/intern\
al::invoke()
     at mx.rpc.remoting::Operation/send()
     at Function/http://adobe.com/AS3/2006/builtin::apply()
     at mx.rpc.remoting.mxml::Operation/send()
     at Function/http://adobe.com/AS3/2006/builtin::apply()
     at
mx.rpc::AbstractService/http://www.adobe.com/2006/actionscript/flash/pro\
xy::callProperty()
     at HelloFromColdFusion/___Button1_click()

My services-config.xml file is default, but I have tried some different
settings, restarting my CF server with every change; none worked
successfully.  I've tried the default endpoint line and I tried putting
in http://www.[mydomainname].com/flex2gateway. Both throw the same
error.

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

Is anybody using a remote Coldfusion development server with Flex 2  and
Remoting? I'd appreciate ideas to try or solutions to this mystery. I'm
not the type that likes to get super deep into the why and how it works.
I just want it to work so I can start developing my Flex 2/CF app.

Thanks,

Jim Pickering



Reply via email to