本文整理汇总了PHP中Zend_Soap_Server::setWsdl方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Soap_Server::setWsdl方法的具体用法?PHP Zend_Soap_Server::setWsdl怎么用?PHP Zend_Soap_Server::setWsdl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Soap_Server
的用法示例。
在下文中一共展示了Zend_Soap_Server::setWsdl方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: soapAction
public function soapAction()
{
$this->_helper->viewRenderer->setNoRender();
$this->_helper->layout()->disableLayout();
$params = $this->getRequest()->getParams();
if (!isset($params['version'])) {
$params['version'] = '1.0';
}
$service = 'Ged_Service_FileSystem';
$this->getResponse()->setHeader('Content-Type', 'text/xml;charset=utf-8', true);
if (isset($params['wsdl'])) {
$autodiscover = new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex');
$autodiscover->setUri(ZendT_Url::getUri());
$autodiscover->setClass($service);
$autodiscover->handle();
} else {
$version = str_replace('.', '_', $params['version']);
$names = explode('_', $service);
$fileWsdl = APPLICATION_PATH . '/modules/' . strtolower($names[0]) . '/' . strtolower($names[1]) . 's/' . $names[2] . '/wsdl/' . $names[2] . '_v' . $version . '.wsdl';
if (file_exists($fileWsdl)) {
$wsdl = str_replace("\\", "/", $fileWsdl);
}
$server = new Zend_Soap_Server();
$server->setWsdl($wsdl);
$server->setClass($service);
$server->handle();
}
}
示例2: soapAction
public function soapAction()
{
$this->getResponse()->setHeader('Content-Type', 'text/xml;charset=utf-8', true);
$this->_helper->viewRenderer->setNoRender();
$this->_helper->layout()->disableLayout();
$version = $this->getRequest()->getParam('version');
$wsdl = $this->getRequest()->getParam('wsdl');
$service = 'Auth_Service_Ldap';
if ($wsdl) {
$autodiscover = new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex');
$autodiscover->setUri(ZendT_Url::getUri());
$autodiscover->setClass($service);
$autodiscover->handle();
} else {
if (!$version) {
$version = '1_0';
}
$fileWsdl = APPLICATION_PATH . '/modules/auth/services/Ldap/version_' . $version . '.wsdl';
if (file_exists($fileWsdl)) {
$wsdl = str_replace("\\", "/", $fileWsdl);
} else {
$wsdl = ZendT_Url::getUri() . '?wsdl=1';
}
$server = new Zend_Soap_Server();
$server->setWsdl($wsdl);
$server->setClass($service);
$server->handle();
}
}
示例3: soapAction
public function soapAction()
{
$this->_helper->viewRenderer->setNoRender();
$this->_helper->layout()->disableLayout();
$params = $this->getRequest()->getParams();
$service = 'ZendT_Mail_Service';
$this->getResponse()->setHeader('Content-Type', 'text/xml;charset=utf-8', true);
if (isset($params['wsdl'])) {
$autodiscover = new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex');
$autodiscover->setUri(ZendT_Url::getUri());
$autodiscover->setClass($service);
$autodiscover->handle();
} else {
$server = new Zend_Soap_Server();
#$wsdl = ZendT_Url::getUri() . "?wsdl";
$wsdl = APPLICATION_PATH . '/controllers/Mail_v1.wsdl';
$server->setWsdl($wsdl);
$server->setClass($service);
$server->handle();
}
}
示例4: testGetWsdl
public function testGetWsdl()
{
$server = new Zend_Soap_Server();
$this->assertNull($server->getWsdl());
$server->setWsdl(dirname(__FILE__) . '/_files/wsdl_example.wsdl');
$this->assertEquals(dirname(__FILE__) . '/_files/wsdl_example.wsdl', $server->getWsdl());
}
示例5: define
<?php
// Define path to application directory
defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
defined('APPLICATION_ENV') || define('APPLICATION_ENV', getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development');
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(realpath(APPLICATION_PATH . '/../library'), get_include_path())));
/** Zend_Application */
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
$application->getBootstrap()->bootstrap('db');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
header('Access-Control-Allow-Headers: Content-Type, Authorization, Accept');
if (isset($_GET['wsdl'])) {
$autodiscover = new Zend_Soap_AutoDiscover();
$autodiscover->setClass('Application_Model_WebServices');
$autodiscover->setBindingStyle(array('style' => 'rpc'));
$autodiscover->handle();
} else {
ini_set("soap.wsdl_cache_enabled", "0");
$server = new Zend_Soap_Server();
$server->setOptions(array('soap_version' => SOAP_1_2, 'actor' => 'http://localhost/AgendaTelefonicaPHPSOAP/public/webservice.php', 'encoding' => 'UTF-8'));
$server->setWsdl('http://localhost/AgendaTelefonicaPHPSOAP/public/webservice.php?wsdl');
$server->setClass('Application_Model_WebServices');
$server->handle();
}
示例6: testGetWsdl
public function testGetWsdl()
{
if (!extension_loaded('soap')) {
$this->markTestSkipped('SOAP Extension is not loaded');
}
$server = new Zend_Soap_Server();
$this->assertNull($server->getWsdl());
$server->setWsdl(dirname(__FILE__).'/_files/wsdl_example.wsdl');
$this->assertEquals(dirname(__FILE__).'/_files/wsdl_example.wsdl', $server->getWsdl());
}