문제

I've successfully configured AMF on the flex side. The client is sending messages, but in return it always get empty response ( headers, but no body).

How to debug index.php? How to check if classes are mapped correctly?

Here is my index.php:

use Project\Entity\Product;

require_once('Zend/Amf/Server.php');
require_once(realpath(APPLICATION_PATH . '/models/Amf/') . DIRECTORY_SEPARATOR. 'AmfService.php');

$server = new Zend_Amf_Server();
$server->setClass('AmfService');
$server->setClassMap("Product", "Product");

echo($server -> handle());

and AmfService.php:

use Project\Entity\Product;

class AmfService {

 public function getProducts(){
    $result = array();

    $product = new Product();

    $product->description = "desc";
    $product->title_pl = "title";

    $result[] = $product;

    return $result;
}
}
도움이 되었습니까?

해결책

It turned out that my problem lied on the Flex side rather than php.

My problem wast that I've omit source attribute in RemoteObject declaration. Now it works perfectly :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top