本文整理汇总了PHP中SoapServer::setclass方法的典型用法代码示例。如果您正苦于以下问题:PHP SoapServer::setclass方法的具体用法?PHP SoapServer::setclass怎么用?PHP SoapServer::setclass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoapServer
的用法示例。
在下文中一共展示了SoapServer::setclass方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processSoap
/**
* Intercept the soapServer method call in order to handle the call thrue the process method
* Return php variables, the soap server will transform it in a soap response
*/
public function processSoap()
{
$this->wsdl = new jWSDL($this->request->params['module'], $this->request->params['action']);
$this->soapServer = $this->getSoapServer($this->wsdl);
$this->soapServer->setclass('jSoapHandler', $this);
$this->soapServer->handle($this->request->soapMsg);
}
示例2: processDefault
/**
* Traitement par défaut
*/
public function processDefault()
{
// On charge la classe exportée
Copix::RequireOnce($this->_exportClassFilename);
// Définition du serveur Soap
if (isset($this->_wsname)) {
$server = new SoapServer(_url('wsserver|default|wsdl', array('wsname' => $this->_wsname)));
} else {
$server = new SoapServer(_url('wsserver|default|wsdl'));
}
// Assignation de la classe exportée au serveur
$server->setclass($this->_exportClass);
// Traitement des appels
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$server->handle();
return _arNone();
} else {
$res = '<strong>' . _i18n('wsserver.handle.title') . '</strong>';
$res .= '<ul>';
foreach ($server->getFunctions() as $func) {
$res .= '<li>' . $func . '</li>';
}
$res .= '</ul>';
$res;
}
$tpl = new CopixTpl();
$tpl->assign('MAIN', $res);
return new CopixActionReturn(CopixActionReturn::DISPLAY, $tpl);
}
示例3: Copyright
@package Webservices
@author Nelly Mahu-Lasson
@copyright Copyright (c) 2009-2014 Webservices plugin team
@license AGPL License 3.0 or (at your option) any later version
http://www.gnu.org/licenses/agpl-3.0-standalone.html
@link https://forge.indepnet.net/projects/webservices
@link http://www.glpi-project.org/
@since 2009
--------------------------------------------------------------------------
*/
if (!extension_loaded("soap")) {
header("HTTP/1.0 500 Extension soap not loaded");
die("Extension soap not loaded");
}
ini_set("soap.wsdl_cache_enabled", "0");
define('DO_NOT_CHECK_HTTP_REFERER', 1);
include "../../inc/includes.php";
Plugin::load('webservices', true);
Plugin::doHook("webservices");
plugin_webservices_registerMethods();
error_reporting(E_ALL);
try {
$server = new SoapServer(null, array('uri' => ''));
$server->setclass('PluginWebservicesSoap');
} catch (Exception $e) {
echo $e;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$server->handle();
}