View Full Version : Flex 2 app with CF Flash remoting issue
unitedlocalbands
04-09-2008, 05:13 PM
Have you seen this error?
faultCode:Client.Error.MessageSend faultString:'Send failed'
faultDetail:'Channel.Connect.Failed error
NetConnection.Call.Failed: HTTP: Status 404:
url: 'http://www.unitedlocalbands.com/flex2gateway/''
I can make this work on my localhost:8500 but cant seem to get it to work my my shared host.
Thanks for your help.
kahuja
04-09-2008, 09:25 PM
If this is working for your localhost:8500, it means that something is not correct in yout configurations.
You should check your configuration files and see how are the channels defined.
unitedlocalbands
04-09-2008, 10:02 PM
Do you mean the services-config.xml file?
Do I need to upload this file to the shared server?
I thought that this file was only used by the flex compiler.
kahuja
04-09-2008, 10:12 PM
The files are used by the SDK/compiler only, but the server needs to have the settings. Check if the files have correct entries as they sit in your folder locally.
Also, hoping that the URL you are using on the localhost:8500 and on the server are same, just that the domain would change?
unitedlocalbands
04-09-2008, 10:18 PM
Thank you very much for your help.
I'm not sure I follow you on the url part.
The url on my local server looks somthing like...
http://localhost:8500/cfide/htdocs/....
and on the shared server it would be...
http://www.unitedlocalbands.com/..
So they really cant be the same right?
What Im trying to do is flash remote to a .cfc file to retrieve the session variables into the flex application.
this project has been killing me slowly for the last three months. I just started learning flex....
Thanks again
kahuja
04-09-2008, 10:19 PM
Are you using remoting objects?
unitedlocalbands
04-09-2008, 10:20 PM
Yes sir I am. here the mxml file
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
[Bindable]
public var sResult:Array;
public function handleArrayResult(event:ResultEvent):void{
sResult=event.result as Array;
}
]]>
</mx:Script>
<mx:RemoteObject
id="myService"
destination="ColdFusion"
source="helloworld.bin.helloworld"
showBusyCursor="true">
<mx:method name="sayHelloArray" result="handleArrayResult(event)" fault="Alert.show(event.fault.message)"/>
</mx:RemoteObject>
<mx:Label id="lblStringResult" text="{sResult}"/>
<mx:Button label="get Array via Remote Object" click="myService.sayHelloArray()"/>
</mx:Application>
kahuja
04-09-2008, 10:47 PM
I am little confused now, let me ask a few questions/clarify:
1. You are using remoting on the client;
1.1. Are you using AMF?
2. What is on the server? - Web Services, Java API or something else?
3. What is the techstack used on the server? - like what application server are you using?
4. On the local web server, website, have you deployed any Flex messaging files?
kahuja
04-09-2008, 10:48 PM
FYI... I am off to sleep now, would be able to answer your questions in a few hours.
unitedlocalbands
04-09-2008, 10:55 PM
Thanks again, Sleep well...
1)I think I'm using AMF...
I have a coldfusion MX7.02 server on a shared host.
I'm using the flex2 application to access a coldfusion component on my shared server.
On my local machine at home on my desk top I have a cf server as well where I can test stuff out.
So my whole website is ran from the shared hosting server. So I dont host anything from my locahost:8500 machine...
I only use it for development.
So when I upload all the flex 2 files I get the error i described above
Check out this link here and you can see the application at and watch it fail.
http://www.unitedlocalbands.com/helloworld_ro/bin/HelloWorld_ro.html
kahuja
04-10-2008, 03:38 AM
It is failing because the link that the application is listening to "http://www.unitedlocalbands.com/flex2gateway/" is unavailable.
I am not CF expert, but know my Java. In Java world I need a servlet on the server to listen to the AMF requests. Can you send me your configurations files (just upload) and I would be able to help on that.
unitedlocalbands
04-10-2008, 06:52 PM
Here is the services-congif.xml file but in text format. This is the only configuration file that I know of right now.
If you can think of anyothers that are used in flash remoting, let me know and I will find them
Thanks again for all your help.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.