Details
Description
We use the following gateway to handle the amf requests:
<?php ini_set("display_errors", 1); $dir = dirname(__FILE__); $webroot = $_SERVER['DOCUMENT_ROOT']; $configfile = "$dir/amf_config.ini"; //default zend install directory $zenddir = $webroot. '/ZendFramework/library'; //Load ini file and locate zend directory if(file_exists($configfile)) { $arr=parse_ini_file($configfile,true); if(isset($arr['zend']['zend_path'])){ $zenddir = $arr['zend']['zend_path']; } } // Setup include path //add zend directory to include path set_include_path(get_include_path().PATH_SEPARATOR.$zenddir); // Initialize Zend Framework loader require_once 'Zend/Loader/Autoloader.php'; Zend_Loader_Autoloader::getInstance(); // Load configuration $default_config = new Zend_Config(array("production" => false), true); $default_config->merge(new Zend_Config_Ini($configfile, 'zendamf')); $default_config->setReadOnly(); $amf = $default_config->amf; // Store configuration in the registry Zend_Registry::set("amf-config", $amf); // Initialize AMF Server $server = new Zend_Amf_Server(); $server->setProduction($amf->production); if(isset($amf->directories)) { $dirs = $amf->directories->toArray(); foreach($dirs as $dir) { $server->addDirectory($dir); } } // Initialize introspector for non-production if(!$amf->production) { $server->setClass('Zend_Amf_Adobe_Introspector', '', array("config" => $default_config, "server" => $server)); $server->setClass('Zend_Amf_Adobe_DbInspector', '', array("config" => $default_config, "server" => $server)); } // Handle request echo $server->handle();
With Zend framework 1.8.3 this works fine, but with Zend Framework 1.8.4, we receive the following error:
Server error Class "EmployeeService" does not exist #0 C:\wamp\www\ZendFramework\library\Zend\Amf\Server.php(540): Zend_Amf_Server->_dispatch('count', Array, 'EmployeeService') #1 C:\wamp\www\ZendFramework\library\Zend\Amf\Server.php(616): Zend_Amf_Server->_handle(Object(Zend_Amf_Request_Http)) #2 C:\wamp\www\TestZend184-debug\gateway.php(49): Zend_Amf_Server->handle() #3 {main}
Please attach config file and describe where EmployeeService class is.