【发布时间】:2010-06-03 12:25:12
【问题描述】:
我有下面的代码
class ReservationController extends Zend_Controller_Action
{
public function init()
{
}
public function indexAction()
{
$this->_helper->viewRenderer->setNoRender();
$this->_helper->layout->disableLayout();
$soap = new Zend_Rest_Server();
$soap->setClass('Someclass');
$soap->handle();
}
}
和
<?php
class IndexController extends Zend_Controller_Action
{
private $_URI = "http://www.mysite.local/crm/reservation";
public function clientAction() {
$this->_helper->viewRenderer->setNoRender();
$this->_helper->layout->disableLayout();
$client = new Zend_Rest_Client($this->_URI);
echo $client->sayHello('nisanth')->get();
}
}
类和方法为
<?php
class Someclass
{
/**
* Say Hello
*
* @param string $who
* @return string
*/
function sayHello($who)
{
return "Hello $who";
}
}
但是在调用这个的时候 我有一个错误
消息:REST 响应错误:simplexml_load_string() [function.simplexml-load-string]: ^
请帮我解决这个问题
【问题讨论】:
-
刚刚遇到同样的错误信息。
标签: web-services rest zend-framework php zend-rest