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


PHP SoapServer::getFunctions方法代码示例

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


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

示例1: 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);
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:32,代码来源:default.actiongroup.php

示例2: ws

 public function ws()
 {
     Load::library('WebService');
     $server = new SoapServer(null, array('uri' => 'http://localhost/freekore/test/ws'));
     // Asignamos la Clase
     $server->setClass('WebService');
     // Atendemos las peticiones
     $server->handle();
     $server->getFunctions();
 }
开发者ID:mmendoza000,项目名称:freekore,代码行数:10,代码来源:test.controller.php

示例3: hello

<?php

class HelloWorld
{
    function hello($name)
    {
        return "Hello from " . $name;
    }
}
$URL = "http://localhost/github/PGROU/testsCedric/testWS/test.wsdl";
$server = new SoapServer($URL);
$server->setClass("HelloWorld");
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $server->handle();
} else {
    echo "Ce serveur SOAP peut gérer les fonctions suivantes : ";
    $functions = $server->getFunctions();
    foreach ($functions as $func) {
        echo $func . "\r";
    }
}
开发者ID:Acedrin,项目名称:PGROU,代码行数:21,代码来源:server.php

示例4: SoapFault

        throw new SoapFault("iTop SOAP server", "Invalid argument service_category: '{$sServiceClass}' is not a PHP class");
    } elseif (!is_subclass_of($sServiceClass, 'WebServicesBase')) {
        // not a valid class name (not deriving from WebServicesBase)
        throw new SoapFault("iTop SOAP server", "Invalid argument service_category: '{$sServiceClass}' is not derived from WebServicesBase");
    } else {
        $oSoapServer->setClass($sServiceClass, null);
    }
} else {
    $oSoapServer->setClass('BasicServices', null);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    CMDBObject::SetTrackOrigin('webservice-soap');
    $oSoapServer->handle();
} else {
    echo "This SOAP server can handle the following functions: ";
    $aFunctions = $oSoapServer->getFunctions();
    echo "<ul>\n";
    foreach ($aFunctions as $sFunc) {
        if ($sFunc == 'GetWSDLContents') {
            continue;
        }
        echo "<li>{$sFunc}</li>\n";
    }
    echo "</ul>\n";
    echo "<p>Here the <a href=\"{$sWsdlUri}\">WSDL file</a><p>";
    echo "You may also want to try the following service categories: ";
    echo "<ul>\n";
    foreach (get_declared_classes() as $sPHPClass) {
        if (is_subclass_of($sPHPClass, 'WebServicesBase')) {
            $sServiceCategory = $sPHPClass;
            $sSoapServerUri = 'http' . (utils::IsConnectionSecure() ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . dirname($_SERVER['SCRIPT_NAME']) . '/../webservices/soapserver.php';
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:31,代码来源:soapserver.php

示例5: SoapServer

try {
    $server = new SoapServer($uri . '/soap/codendi.wsdl.php?wsdl', array('trace' => 1, 'soap_version' => SOAP_1_1));
    require_once 'utils_soap.php';
    require_once 'common/session.php';
    require_once 'common/group.php';
    require_once 'common/users.php';
    require_once 'tracker/tracker.php';
    require_once 'frs/frs.php';
    // include the <Plugin> API (only if plugin is available)
    $em =& EventManager::instance();
    $em->processEvent('soap', array());
} catch (Exception $e) {
    echo $e;
}
// if POST was used to send this request, we handle it
// else, we display a list of available methods
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (LOG_SOAP_REQUESTS) {
        error_log('SOAP Request :');
        error_log($HTTP_RAW_POST_DATA);
    }
    $server->handle();
} else {
    echo '<strong>This SOAP server can handle following functions : </strong>';
    echo '<ul>';
    foreach ($server->getFunctions() as $func) {
        echo '<li>', $func, '</li>';
    }
    echo '</ul>';
    echo '<a href="codendi.wsdl.php?wsdl">You can access the WSDL</a>';
}
开发者ID:nickl-,项目名称:tuleap,代码行数:31,代码来源:index.php

示例6: SoapFault

    $wsdlFile->addTypes();
    $wsdlFile->addMessage();
    $wsdlFile->addPortType();
    $wsdlFile->addBinding();
    $wsdlFile->addService($username, $password, $m, $a, $classname);
    echo $wsdlFile->saveXML();
} else {
    if (!$classname || !class_exists($classname, true)) {
        throw new SoapFault("1", "Error : classname is not valid");
    }
    // on indique au serveur à quel fichier de description il est lié
    try {
        $base_url = CAppUI::conf("webservices wsdl_root_url");
        $base = $base_url ? $base_url : CApp::getBaseUrl();
        $serverSOAP = new SoapServer($base . "/?login=1&username={$username}&password={$password}&m={$m}&a={$a}&class={$classname}&wsdl");
    } catch (Exception $e) {
        echo $e->getMessage();
    }
    $serverSOAP->setClass($classname);
    // Lance le serveur
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        $serverSOAP->handle();
    } else {
        echo '<strong>This Mediboard SOAP server can handle following functions : </strong>';
        echo '<ul>';
        foreach ($serverSOAP->getFunctions() as $_function) {
            echo '<li>', $_function, '</li>';
        }
        echo '</ul>';
    }
}
开发者ID:fbone,项目名称:mediboard4,代码行数:31,代码来源:soap_server.php


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