macromedia flash flash remoting:
Can you make multiple calls to the same service in AMFPHP? I can make single
calles all day long with great success but when I make to sequential calls to
the same service that contains two different methods I get an error that states:
error: no class named Test is known to the gateway
here is my Actionscript:
import mx.remoting.Service; // import Service class
import mx.rpc.FaultEvent; // import FaultEvent class
import mx.remoting.PendingCall; // import PendingCall clsas
import mx.rpc.ResultEvent; // import ResultEvent class
import mx.rpc.RelayResponder; // import RelayResponder class
//-------------------------------
// Remoting
//-------------------------------
//enable debugging
mx.remoting.debug.NetDebug.initialize();
//create connection and get service Class file
var myService:Service = new
Service("http://blahblah/gateway.php",null,"Test",null, null);
//create call and responder to doHello function
var pc:PendingCall = myService.hello(); // call service method
pc.responder = new RelayResponder(this, "hello_Result", "hello_Fault");
//Responder Functions for hello
function hello_Result( re:ResultEvent ):Void { // receive results
trace("response: " + re.result);
}
function hello_Fault( fe:FaultEvent ):Void { // receive fault
trace( "no response: " + fe.fault.faultstring);
}
//parseXML service call
var parse_pc:PendingCall = myService.readXML();
parse_pc.responder = new RelayResponder(this, "readXML_Result",
"readXML_Fault");
function parseXML(){
parse_pc = myService.readXML();
}
function readXML_Result(re:ResultEvent):Void{// receive results
trace("response: " + re.result);
}
function readXML_Fault(fe:FaultEvent):Void{ // receive faults
trace("error: " + fe.fault.faultstring);
}