macromedia flash flash remoting:
Hello All!
I have constructed a simple "Hello World" cfc in CFMX 7 and am accessing it
through Remoting. It works fine twice and then anything after that I get the
indecipherable "Error Opening URL" msg.
I have created three separate cfcs (each doing the same thing more or less) to
test against; have created three different services (each using the same
connection, however) and no matter which combination I try, I get the same
behavior: 2 successes and then failures.
I have tried locally, loaded to the domain, loaded to a separate domain, etc.
and still no dice. Here's a sample:
// import necessary libraries
import mx.styles.*;
import mx.remoting.*;
import mx.rpc.*;
import mx.services.Log;
import mx.remoting.debug.NetDebug;
NetDebug.initialize();
// functions that handle the remote results
function sayWhat(str) {
var sayWhatPC:PendingCall = projectReg.sayWhat(str);
sayWhatPC.responder = new RelayResponder( this, "sayWhat_Result",
"sayWhat_Fault" );
}
function sayWhat_Result(result:ResultEvent) {
trace("sayWhat success result:");
trace(result.result);
_root.debug_txt.text = result.result;
}
function sayWhat_Fault(fault:FaultEvent) {
trace("sayWhat fault result:");
trace(fault.fault.faultstring);
_root.debug_txt.text =fault.fault.faultstring;
}
// connect to service and create service object
var srvc = "
http://ourserver.com/flashservices/gateway"; var projectReg:Service = new Service(srvc, new Log(),
"project.com.registration", null, null );
NOTE: The last bit of code above does not seem to want to play nice posting
to these forums <sigh>. there really is no double var in front of the service
address!