我现在正在使用ZF2-RC2,并且试图在soap中执行一个webservice,我成功地通过强制头来使wsdl工作,但是对于服务器部分,它根本不起作用,并且我得到了一个错误500告诉我。
PHP警告: SoapServer::SoapServer():I/O警告:加载外部实体失败
错误是当我执行->handle()部分时。
if(isset($_GET['wsdl'])) {
header ("Content-Type:text/xml");
$autodiscover = new AutoDiscover();
$autodiscover->setClass('WsClass')
->setUri('http://adresse/ws/?wsdl');
echo $autodiscover->toXml();
} else {
// pointing to the current file here
$soap = new Server('http://adresse/ws/?wsdl');
$soap->setClass('WsClass');
$soap->handle();
}
exit;有人能帮我吗?
发布于 2012-11-26 20:51:05
您不应该将AutoDiscover对象中的URI设置为wsdl。试一试
$autodiscover->setClass('WsClass')
->setUri('http://adresse/ws');另外,在服务器的构造函数中删除/:
$soap = new Server('http://adresse/ws?wsdl');https://stackoverflow.com/questions/12004217
复制相似问题