PDA

View Full Version : Flash Remoting Error


antiHero
03-06-2008, 07:20 PM
I am working on a Flash remoting project- The swf calls a CFC which returns a temporary struct to flash, and populates a bunch of variables. The whole system worked fine on my developement site, but when the client set up the hosting account and I moved everything into the new domain I cant get my CFC to return the structure. Instead I get this error message:

failure
Service threw an exception during method invocation: null

Ive tried everything. Right now I put the Remote call procedure Im using to call the data from the CFC on my website, which works.

Here is the code Im using, with URLS replaced for privacy reasons...
objSvc = new Service("http://myurl.com/flashservices/gateway", null, "cfcs.CFC", null, null);
// call the helloWorld() method
var pc:PendingCall = objSvc.helloWorld();
// establish result and fault handler methods
pc.responder = new RelayResponder(this, "onResponseSuccess", "onResponseFault");
// response handler for successful connections
var onResponseSuccess = function (resultEvent:ResultEvent):Void {
trace("success");
// populate text box with remote data
mainText.htmlText = resultEvent.result.h1;
mcTime = resultEvent.result.TIMEVAR;
};
// error handler function
var onResponseFault = function (fault:FaultEvent):Void {
trace("failure");
trace(fault.fault.faultstring);
// populate text box with error
mainText.text = fault.fault.faultstring;
};

Anyone that could provide a little insite to this problem would be saving my forehead from further abuse from me ramming it into my own desk!

acolyte
03-08-2008, 06:45 PM
Hi antiHero and welcome to the Forums,

you can use the >[<as>]< tags for Formating the code
in the Forums so that the others can read it much better

is this a Hello Worls Example ? can you post this url aswell please

antiHero
03-10-2008, 06:01 PM
acolyte- thank you, this forum rocks I have found several other solutions for other Flash actionscript problems while surfing here. I plan on making a habit out of coming here.... Thanks for the tip-

The URL for the movie is www.oceanspearls.net/index1.cfm

You will see text, but its actually being called from another domain. Im using a CFC to run a simple query loop over the content. My problem is, the Coponent on this site (oceanspearls.net) is returning NULL to flash. When the same EXACT component works fine if called from my domain....

You can see that the array/structure CFC is working here:
www.oceanspearls.net/qinvoker.cfm

One of my other clients makes top shelf flavored Vodka, and anyone who solves this issue for me (if they are of legal age that is) might just get a bottle on me. Ill even pay for shipping...

acolyte
03-11-2008, 12:50 AM
Hi AntiHero ,

did you ever took a look to the new security issues regarding the new flashplayer release ??

http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_print.html

http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_05.html#_Configuring_URL_Meta-Policies

hope this helps

are you using a cross policy domain xmlfile ?

antiHero
03-11-2008, 05:47 AM
acolyte-
thank you for the links-
Im going to read thru again and see if I missed anything. Also, I am indeed using a cross-domain.xml file-

antiHero
03-22-2008, 05:36 PM
Follow up post for anyone following this error. I finally had my host recheck the domain to see if anything looked off. He restarted the instance of Coldfusion on this IP and it resolved the security sandbox issue that was causing this error. Programmers running Flash actionscript 2.0 on a Coldfusion Sever experiencing remoting problems- If you know your CFC is properly functioning and you know your calling the correct location from flash- and still recieiving a NULL value- Its probably a security sandbox issue. I hope this saves someone some time in the future- Acolyte- Thanks for the reading links I found that sandbox error note in that link you posted.