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


PHP Zend_Soap_Server::setPersistence方法代码示例

本文整理汇总了PHP中Zend_Soap_Server::setPersistence方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Soap_Server::setPersistence方法的具体用法?PHP Zend_Soap_Server::setPersistence怎么用?PHP Zend_Soap_Server::setPersistence使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Soap_Server的用法示例。


在下文中一共展示了Zend_Soap_Server::setPersistence方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

<?php

ini_set("soap.wsdl_cache_enabled", 0);
ini_set("soap.wsdl_cache_dir", "/tmp");
ini_set("soap.wsdl_cache_ttl", 86400);
if (isset($_GET['wsdl'])) {
    $autodiscover = new Zend_Soap_AutoDiscover();
    $autodiscover->setBindingStyle(array('style' => 'rpc'));
    $autodiscover->setOperationBodyStyle(array('use' => 'literal'));
    $autodiscover->setClass('ProviderWebServiceSyncUnits');
    $data = file_get_contents('php://input');
    $autodiscover->handle($data);
} else {
    $server = new Zend_Soap_Server(__URLSERVERAPP__ . '/webservices/unidades/server.php?wsdl', array('cache_wsdl' => false));
    $server->setClass('ProviderWebServiceSyncUnits');
    $server->setPersistence(SOAP_PERSISTENCE_REQUEST);
    $data = file_get_contents('php://input');
    $server->handle($data);
}
开发者ID:roquebrasilia,项目名称:sgdoc-codigo,代码行数:19,代码来源:server.php

示例2: testGetPersistence

 public function testGetPersistence()
 {
     $server = new Zend_Soap_Server();
     $this->assertNull($server->getPersistence());
     $server->setPersistence(SOAP_PERSISTENCE_SESSION);
     $this->assertEquals(SOAP_PERSISTENCE_SESSION, $server->getPersistence());
 }
开发者ID:omusico,项目名称:logica,代码行数:7,代码来源:ServerTest.php

示例3: sprintf

require_once '../library/Shift8.php';
/**
 * While trying to develop the Soap extension for Shift8, I needed a way to debug
 * the events occuring to the remote asterisk, thus the Debug Listener and the 
 * Syslog debug listener
 */
require_once '../library/Debug/Listener/Syslog.php';
if (isset($_GET['wsdl'])) {
    $autodiscover = new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex');
    $autodiscover->setOperationBodyStyle(array('use' => 'literal', 'namespace' => 'http://' . $_SERVER['HTTP_HOST']));
    /*	
     * Does not work with PHP Soap Client. Might be required for .NET clients
     *
    $autodiscover->setBindingStyle(
    	array(
    		'style'		=> 'document',
    		'transport' 	=> 'http://schemas.xmlsoap.org/soap/http'
    	)
    );
    */
    $autodiscover->setClass('Shift8');
    $autodiscover->handle();
} else {
    session_start();
    $wsdl = sprintf('http://%s%s?wsdl', $_SERVER['HTTP_HOST'], $_SERVER['SCRIPT_NAME']);
    $soap = new Zend_Soap_Server($wsdl);
    $soap->setClass('Shift8', $config['asterisk'], $config['manager'], $config['secret'], false, new Shift8_Debug_Listener_Syslog());
    $soap->setPersistence(SOAP_PERSISTENCE_SESSION);
    $soap->registerFaultException('Shift8_Exception');
    $response = $soap->handle();
}
开发者ID:juliancastillot,项目名称:Shift8,代码行数:31,代码来源:index.php

示例4: testGetPersistence

    public function testGetPersistence()
    {
        if (!extension_loaded('soap')) {
           $this->markTestSkipped('SOAP Extension is not loaded');
        }

    	$server = new Zend_Soap_Server();

        $this->assertNull($server->getPersistence());
        $server->setPersistence(SOAP_PERSISTENCE_SESSION);
        $this->assertEquals(SOAP_PERSISTENCE_SESSION, $server->getPersistence());
    }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:12,代码来源:ServerTest.php


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