AMFPHP: Multiple service calls

AMFPHP Add comments

Problem: When you try to call 2 or more services at the same time, it's possible that AMFPHP will return an error saying that the class of the service you're using is not known to the gateway.

no class named yourService is known to the gateway

Solution: Check the setBaseClassPath() method in your gateway.php file. It should use and absolute path instead of a relative path. You can change it like this.

PHP:
  1. //before
  2. $gateway->setBaseClassPath("./services/");
  3.  
  4. //after
  5. $gateway->setBaseClassPath(realpath("services/") . "/");

After this change you should be able to call 2 or more services at the same time.


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

2 Responses to “AMFPHP: Multiple service calls”

  1. JBAustin Says:

    Christophe,
    This didn’t work for me, but it did point me in the right direction.
    I used ServiceCapture to trace my net connection calls and found an error in
    my service class.

    Just another place for others to look.

  2. Nick Says:

    Hi,
    I would like to do multiple services call… but what is the correct sintax in AS3.
    In the first one i call “connection.call(“service”, responder);” managed by “private function onResult(result:Object) …. “. How can I write the the second one so that its come manage to another “function onResult2(result:Object)..” thanks for any help!
    Nick

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in