all groups > macromedia flash flash remoting > september 2004 >
You're in the

macromedia flash flash remoting

group:

Multiple calls to AMFPHP


Multiple calls to AMFPHP xbrotherx
9/28/2004 6:04:17 PM
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);
}

Re: Multiple calls to AMFPHP flashape
10/3/2004 9:44:49 AM
yeah, this is a known problem with amfphp. you need to go to
Sourcefourge and download the latest Executive.php file from the CVS.

you can find more info about it in the forums at www.sephiroth.it

On 2004-09-28 11:04:17 -0700, "xbrotherx" <webforumsuser@macromedia.com> said:

[quoted text, click to view]

Re: Multiple calls to AMFPHP bluestix
10/15/2004 3:54:20 PM
I am having a similar problem except I cant even make multiple calls if I define a new service.

And I dont get any errors. It just doesnt do anything.

Re: Multiple calls to AMFPHP luchySCEU
10/15/2004 11:46:28 PM
HI! .. i think that the error is in the server object reference.
you must make a call like this
var myGatewayURL = "http://www.mysite.com/mygateway.php";
var myServiceName = "getSomething"; // were getSomething.php is the php file
that have the constructor function
//then you use the string "myServiceName" in the serviceObj as follow..
var myService:Service = new Service("myGatewayURL",null,"myServiceName",null,
null);
AddThis Social Bookmark Button