zend framework 提供的webservices
谁有这样的完整的例子。用到Zend_Soap_Server 等zend framework提供的soap扩展的。
想学一下,哪位大侠给提供一些资料,例子的更好啊。最好是那种能运行的简单小例子,谢谢啦
------解决方案--------------------
application/controllers/WebServiceController.php
<?php class WebServiceController extends Zend_Controller_Action {
public function init() {
$this->_helper->viewRenderer->setNoRender();
}
public function indexAction() {
if (isset($_GET['wsdl'])) {
$autodiscover = new Zend_Soap_AutoDiscover();
$autodiscover->setClass('Service_Helloworld');
$autodiscover->handle();
} else {
$soap = new Zend_Soap_Server("http://zf-demo.localhost/WebService/index/?wsdl");
$soap->setClass('Service_Helloworld');
$soap->handle();
}
}
public function testAction() {
$params = array(
'name' => 'tom'
);
$client = new SoapClient("http://zf-demo.localhost/WebService/index/?wsdl", array('trace' => 1));
echo $client->__soapCall('sayHello', $params);
}
}
<br><font color="#e78608">------解决方案--------------------</font><br>
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号