|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Failing to connect to ColdFusion.I am playing again with Flex after over a year off. I set up a new
project and was proud of myself that I got one set up in just two tries. I can properly serve up simple, static Flex applications. So I moved on to connecting to my ColdFusion for the back end. When I run it now I get this error when I try to call the ColdFusion component. [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost/playground/flex2gateway/'"] "http://localhost/playground/flex2gateway/" is not a valid URL. The proper path to the Flex project is "http://localhost/flex/playground/". But this does not have a 'flex2gateway' under it. I am not sure what this means. I presume I have something missing in my configurations, but I am not sure what. Google searching has told me to look at the compiler arguments of my project: -services "C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\flex\services-config.xml" -locale en_US This seems to be correct. That is the location of my ColdFusion server. Google results also tell me to look at the endpoint in my services.congig.xml file. But which one? There are several in there and I don't see any that are "ColdFusion" as I sort of expected from my RemoteObject MXML tag. <mx:RemoteObject id="cfc" destination="ColdFusion" source="cfcs.foobar"> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5658 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Failing to connect to ColdFusion.Are you using Flex Builder? You are probably just not setting your project
up correctly. Check out this tutorial I wrote that was part of a bigger project but this step walks you through a basic setup. http://www.danvega.org/blog/index.cfm?mode=entry&entry=9927B08A-3FF4-37A0-036DDF334317ACB5 Thank You Dan Vega danvega@... http://www.danvega.org On Wed, Jan 14, 2009 at 4:34 PM, Ian Skinner <HOF@...> wrote: > I am playing again with Flex after over a year off. I set up a new > project and was proud of myself that I got one set up in just two tries. > > I can properly serve up simple, static Flex applications. So I moved on > to connecting to my ColdFusion for the back end. When I run it now I > get this error when I try to call the ColdFusion component. > > [RPC Fault faultString="Send failed" > faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed > error NetConnection.Call.Failed: HTTP: Failed: url: > 'http://localhost/playground/flex2gateway/'"] > > "http://localhost/playground/flex2gateway/" is not a valid URL. The > proper path to the Flex project is "http://localhost/flex/playground/". > But this does not have a 'flex2gateway' under it. I am not sure what > this means. > > I presume I have something missing in my configurations, but I am not > sure what. Google searching has told me to look at the compiler > arguments of my project: > -services > > "C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\flex\services-config.xml" > -locale en_US > > This seems to be correct. That is the location of my ColdFusion server. > > Google results also tell me to look at the endpoint in my > services.congig.xml file. But which one? There are several in there > and I don't see any that are "ColdFusion" as I sort of expected from my > RemoteObject MXML tag. > <mx:RemoteObject > id="cfc" > destination="ColdFusion" > source="cfcs.foobar"> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5659 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Failing to connect to ColdFusion.Dan Vega wrote:
> Are you using Flex Builder? You are probably just not setting your project > up correctly. Check out this tutorial I wrote that was part of a bigger > project but this step walks you through a basic setup. > > http://www.danvega.org/blog/index.cfm?mode=entry&entry=9927B08A-3FF4-37A0-036DDF334317ACB5 Yes I am using Flex Builder 2. I also suspect it is a problem with the project set up, but I am unsure what the problem is. I now get an error that seems to point to the right folder by changing the context of my project from 'playground' to 'flex/playground'. But that didn't resolve anything. What I am wondering is if I am having trouble with my server set up. ColdFusion c:/Jrun4/servers/cfusion/ Flex Development Location c:/development/Flex/Playground/ IIS Web Root c:/development/wwwroot/ Flex Project output folder c:/development/wwwroot/flex/playground/ I looked over your link, but there seems to be quite a difference between Flex 2 and Flex 3 in the wizards. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5660 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Failing to connect to ColdFusion. Flash and Flex communicate using an AMF Gateway built into ColdFusion.
Most of the time it is located at "domain/flex2gateway" so in your case I'd expect it to be "localhost/flex2gateway" . If that URL loads a blank page [as opposed to a 404 error], there is a good chance that the gateway is working properly. Just that your Flex app is looking for the URL in the wrong place. You probably need to open up the Services-Config file and possibly make changes to it. The full path location of services-config should be listed as a compiler parameter in the project properties. Ian Skinner wrote: > I am playing again with Flex after over a year off. I set up a new > project and was proud of myself that I got one set up in just two tries. > > I can properly serve up simple, static Flex applications. So I moved on > to connecting to my ColdFusion for the back end. When I run it now I > get this error when I try to call the ColdFusion component. > > [RPC Fault faultString="Send failed" > faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed > error NetConnection.Call.Failed: HTTP: Failed: url: > 'http://localhost/playground/flex2gateway/'"] > > "http://localhost/playground/flex2gateway/" is not a valid URL. The > proper path to the Flex project is "http://localhost/flex/playground/". > But this does not have a 'flex2gateway' under it. I am not sure what > this means. > > I presume I have something missing in my configurations, but I am not > sure what. Google searching has told me to look at the compiler > arguments of my project: > -services > "C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\flex\services-config.xml" > -locale en_US > > This seems to be correct. That is the location of my ColdFusion server. > > Google results also tell me to look at the endpoint in my > services.congig.xml file. But which one? There are several in there > and I don't see any that are "ColdFusion" as I sort of expected from my > RemoteObject MXML tag. > <mx:RemoteObject > id="cfc" > destination="ColdFusion" > source="cfcs.foobar"> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5661 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Failing to connect to ColdFusion.Don't forget the trailing slash on the flex2gateway link ( localhost/flex2gateway/ ) or it will not work either
>Flash and Flex communicate using an AMF Gateway built into ColdFusion. >Most of the time it is located at "domain/flex2gateway" so in your case >I'd expect it to be "localhost/flex2gateway" . If that URL loads a >blank page [as opposed to a 404 error], there is a good chance that the >gateway is working properly. Just that your Flex app is looking for the >URL in the wrong place. > > You probably need to open up the Services-Config file and possibly make >changes to it. The full path location of services-config should be >listed as a compiler parameter in the project properties. > >Ian Skinner wrote: >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5662 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Failing to connect to ColdFusion.Jeffry Houser wrote:
> Flash and Flex communicate using an AMF Gateway built into ColdFusion. > Most of the time it is located at "domain/flex2gateway" so in your case > I'd expect it to be "localhost/flex2gateway" . If that URL loads a > blank page [as opposed to a 404 error], there is a good chance that the > gateway is working properly. Thanks, this got me there. I did not need to do anything in my services-config file. On your hint that the path should be "domain/flex2gateway" I removed everything from the 'path' property in my Project Configuration. Thus Flash player was now looking for 'http://localhost/flex2gateway"; *not* "http://localhost/playground/flex2gateway" or "http://localhost/flex/playground" which is what it was looking for before. I then got an error about not being able to find my cfc file and I realized that I need the full path from the root of the site *not* the relative path from the flex/flash page. <mx:RemoteObject id="helloWorld" destination="ColdFusion" source="flex.playground.cfcs.foobar"> I am now connecting to my local ColdFusion server and receiving results from it. Thank You Jaffry and Gareth. Ian Skinner ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5663 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
| Free embeddable forum powered by Nabble | Forum Help |