Peter - thanks for the questions -

Yes I have a crossdomain.xml in the webroot. Here's what is in it:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy
        SYSTEM "http://www.adobe.com/dtds/cross-domain-policy.dtd";>
<cross-domain-policy>
        <allow-access-from domain="*" />
</cross-domain-policy>

I'm a bit perplexed by the context-root requirements. Can you explain
to me what context-root is all about? I read the technote about it,
but I'm not getting that error - so I didn't think it applied to any
misconfiguration I might have.

One thing I can tell you that has me confused me a bit, it when using
the Multiserver option in Coldfusion, my webroot contains a CFIDE
directory and is completely separate from everything in the JRUN4
folder. Yet the valid root folder when configuring the Flex Project
leads me to: "J:\servers\cfusion\cfusion-ear\cfusion-war" So when you
speak of "context-root" are we talking about what's in the cfusion-war
folder or in my webroot?

My HelloFromColdfusion.html file is in my webroot along with the .swf
and everything else FlexBuilder2 put into the bin directory. The
Output folder for the Flex Project was pointed at my
wwwroot/flex2btb/flex directory. Maybe you can tell me if I need the
context root setting or not?

Thanks,
Jim

--- In [email protected], "Peter Farland" <[EMAIL PROTECTED]> wrote:
>
> 1. Do you have a crossdomain.xml file in the webroot of the server
> hosting the flex2gateway endpoint allowing access for SWFs loaded in
> other domains?
>  
> 2. I think you are relying on the default context root for your cold
> fusion deployment, if so, try removing the {context-root} token out of
> your channel-definition in services-config.xml (or alternatively provide
> a value for the command line args -context-root "" )
>  
>  
>  
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Jim Pickering
> Sent: Thursday, January 11, 2007 12:12 PM
> To: [email protected]
> Subject: [flexcoders] Anyone Using a Remote CF Server with Flex 2,
> Remoting?
> 
> 
> 
> [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
> <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 <http://www.adobe.com/2006/flex/mx/internal::invoke> ()
> at
> mx.rpc.remoting.mxml::Operation/http://www.adobe.com/2006/flex/mx/intern
> \
> al::invoke <http://www.adobe.com/2006/flex/mx/internal::invoke> ()
> at mx.rpc.remoting::Operation/send()
> at Function/http://adobe.com/AS3/2006/builtin::apply
> <http://adobe.com/AS3/2006/builtin::apply> ()
> at mx.rpc.remoting.mxml::Operation/send()
> at Function/http://adobe.com/AS3/2006/builtin::apply
> <http://adobe.com/AS3/2006/builtin::apply> ()
> at
> mx.rpc::AbstractService/http://www.adobe.com/2006/actionscript/flash/pro
> \
> xy::callProperty
> <http://www.adobe.com/2006/actionscript/flash/proxy::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