Php Zend#u Rest#u服务器不';t调用类方法

Php Zend#u Rest#u服务器不';t调用类方法,php,web-services,zend-framework,Php,Web Services,Zend Framework,我正在尝试构建一个基本的应用程序,2个PHP文件,一个使用Zend_Rest_服务器,另一个使用Zend_Rest_客户端 以下是服务器代码: class test1 { public function test() { return "mytest"; } } include_once ("common.php"); set_include_path('.' . PATH_SEPARATOR . '..\..\library/' . get_incl

我正在尝试构建一个基本的应用程序,2个PHP文件,一个使用Zend_Rest_服务器,另一个使用Zend_Rest_客户端

以下是服务器代码:

class test1 {


    public function test() {
        return "mytest";
    }


}

include_once ("common.php");

set_include_path('.' . PATH_SEPARATOR . '..\..\library/' . get_include_path());
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();

$server = new Zend_Rest_Server();

$server->setClass('test1');
$server->handle();
客户端代码是

set_include_path('.' . PATH_SEPARATOR . '.\library/' . get_include_path());
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();

$client = new Zend_Rest_Client('http://localhost/dbuilder/db/jpuzzle.php');

$client->arg("test");
echo $client->get();
当我从命令行界面运行client ws.php应用程序时,我收到以下消息:

Zend\u Rest\u客户端\u结果\u异常:Rest响应错误:当p 使用simplexml创建REST响应。在C:\Program Files\VertrigoServ\www\li中 第67行的brary\Zend\Rest\Client\Result.php


它不运行的原因是什么?如何调试它?

实际问题不在服务中,而是在不推荐使用的自动加载中

我换了

require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();

并使web服务正常工作

require_once ‘Zend/Loader/Autoloader.php’;
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->setFallbackAutoloader(true);