Zend_Soap_AutoDiscover
我在从类中生成 WSDL 文件时遇到问题。
有人可以解释我做错了什么吗?
在 bootstrap.php 我有一个方法:
public function _initWsdl()
{
require_once("http://localhost:8080/zf_mta/backend.php");
$autoDiscover = new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex');
$autoDiscover->setClass('Backend');
$autoDiscover->setUri('http://localhost:8080/zf_mta/backend.php');
$autoDiscover->handle();
return $autoDiscover;
}
这是 backend.php 类
class Order {
/** @var string */
public $productid;
/** @var string */
public $customerid;
/** @var int */
public $productcnt;
public function __construct($productid,$customerid,$productcnt) {
$this->productid = $productid;
$this->customerid = $customerid;
$this->productcnt = $productcnt;
}
}
class Orders {
/** @var Order[] */
public $orders;
}
class Backend {
/**
* @param Orders $orders
* @return string
*/
public function placeOrders($orders) {
return print_r($orders,1);
}
}
我收到错误:
内部服务器错误
服务器遇到内部错误或配置错误,无法完成您的请求...
错误日志:
[07-Sep-2012 13:39:48 UTC] PHP Warning: require_once() [<a href='function.require-once'>function.require-once</a>]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in E:\Zend Server\Apache2\htdocs\zf_mta\application\Bootstrap.php on line 18
[07-Sep-2012 13:39:48 UTC] PHP Warning: require_once(http://localhost:8080/zf_mta/backend.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: no suitable wrapper could be found in E:\Zend Server\Apache2\htdocs\zf_mta\application\Bootstrap.php on line 18
[07-Sep-2012 13:39:48 UTC] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'http://localhost:8080/zf_mta/backend.php' (include_path='E:\Zend Server\Apache2\htdocs\zf_mta\application/../library;E:\Zend Server\Apache2\htdocs\zf_mta\library;.;E:\Zend Server\ZendServer\share\ZendFramework\library') in E:\Zend Server\Apache2\htdocs\zf_mta\application\Bootstrap.php on line 18