0

im using AMFPHP to link webservices into my app this is what I wanna do:

gateway.call("Medic.GetSupplierByZipCode("10027")",new Responder(success,fail));

the thing is that Medic.GetSupplierByZipCode() goes parametrized, and I'm not recieving any content for my data grid.

So, how do you send a parametrized call to AMFPHP?

Francisco Gutiérrez
  • 1,355
  • 13
  • 23

1 Answers1

0

I found the solution.

AS (Snippet)

public function init():void
{
    var params:Array = new Array("param1", "param2");
    gateway.connect("http://localhost/amfphp/gateway.php");
    gateway.call("TestService.testFunction", rs, params);
}

PHP

<?php
class TestService {
    public function testFunction($params) {
        return $params[0] . $params[1];
    }
}
?>

There we go.

Francisco Gutiérrez
  • 1,355
  • 13
  • 23