当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Soap_Server::setWsdl方法代码示例

本文整理汇总了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();
     }
 }
开发者ID:rtsantos,项目名称:mais,代码行数:28,代码来源:FileSystemController.php

示例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();
     }
 }
开发者ID:rtsantos,项目名称:mais,代码行数:29,代码来源:LogonController.php

示例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();
     }
 }
开发者ID:rtsantos,项目名称:mais,代码行数:21,代码来源:MailController.php

示例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());
 }
开发者ID:omusico,项目名称:logica,代码行数:7,代码来源:ServerTest.php

示例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();
}
开发者ID:rmuchoa,项目名称:AgendaTelefonica,代码行数:29,代码来源:webservice.php

示例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());
    }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:12,代码来源:ServerTest.php


注:本文中的Zend_Soap_Server::setWsdl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。