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


PHP SOAP_Server类代码示例

本文整理汇总了PHP中SOAP_Server的典型用法代码示例。如果您正苦于以下问题:PHP SOAP_Server类的具体用法?PHP SOAP_Server怎么用?PHP SOAP_Server使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: SOAP_Server_TCP

 function SOAP_Server_TCP($localaddr = '127.0.0.1', $port = 10000, $type = 'sequential')
 {
     parent::SOAP_Server();
     $this->localaddr = $localaddr;
     $this->port = $port;
     $this->type = $type;
 }
开发者ID:casan,项目名称:eccube-2_13,代码行数:7,代码来源:TCP.php

示例2: SOAP_Server_TCP

 function SOAP_Server_TCP($localaddr = "127.0.0.1", $port = 10000, $listen = 5, $reuse = TRUE)
 {
     parent::SOAP_Server();
     $this->localaddr = $localaddr;
     $this->port = $port;
     $this->listen = $listen;
     $this->reuse = $reuse;
 }
开发者ID:valentijnvenus,项目名称:geocloud,代码行数:8,代码来源:TCP.php

示例3: SOAP_Server_Email

 function SOAP_Server_Email($send_response = true)
 {
     parent::SOAP_Server();
     $this->send_response = $send_response;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:5,代码来源:Email.php

示例4: SOAP_Server

// | This source file is subject to version 2.02 of the PHP license,      |
// | that is bundled with this package in the file LICENSE, and is        |
// | available at through the world-wide-web at                           |
// | http://www.php.net/license/2_02.txt.                                 |
// | If you did not receive a copy of the PHP license and are unable to   |
// | obtain it through the world-wide-web, please send a note to          |
// | license@php.net so we can mail you a copy immediately.               |
// +----------------------------------------------------------------------+
// | Authors: Shane Caraveo <Shane@Caraveo.com>                           |
// +----------------------------------------------------------------------+
//
// $Id: server.php,v 1.10 2005/03/10 23:16:40 yunosh Exp $
//
// first, include the SOAP/Server class
require_once 'SOAP/Server.php';
$server = new SOAP_Server();
/* tell server to translate to classes we provide if possible */
$server->_auto_translation = true;
require_once 'example_server.php';
$soapclass = new SOAP_Example_Server();
$server->addObjectMap($soapclass, 'urn:SOAP_Example_Server');
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
    $server->service($HTTP_RAW_POST_DATA);
} else {
    require_once 'SOAP/Disco.php';
    $disco = new SOAP_DISCO_Server($server, 'ServerExample');
    header("Content-type: text/xml");
    if (isset($_SERVER['QUERY_STRING']) && strcasecmp($_SERVER['QUERY_STRING'], 'wsdl') == 0) {
        echo $disco->getWSDL();
    } else {
        echo $disco->getDISCO();
开发者ID:khrisna,项目名称:eccubedrm,代码行数:31,代码来源:server.php

示例5: SOAP_Value

            }
        }
        return new SOAP_Value('echoStringArrayReturn', null, $ra);
    }
    function echoStruct($inputStruct)
    {
        if (is_object($inputStruct) && strtolower(get_class($inputStruct)) == 'soapstruct') {
            return $inputStruct->__to_soap('return');
        } else {
            if (is_object($inputStruct)) {
                $inputStruct = get_object_vars($inputStruct);
            }
            $struct = new SOAPStruct($inputStruct['varString'], $inputStruct['varInt'], $inputStruct['varFloat']);
            return $struct->__to_soap('return');
        }
    }
    function echoVoid()
    {
        return null;
    }
}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
$groupd = new SOAP_Interop_GroupDRpcEnc();
$server = new SOAP_Server();
$server->_auto_translation = true;
$server->addObjectMap($groupd, 'http://soapinterop/');
$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
$server->addObjectMap($groupd, 'http://soapinterop.org/WSDLInteropTestRpcEnc');
$server->bind('http://localhost/soap_interop/wsdl/InteropTestRpcEnc.wsdl.php');
$server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:server_Round3GroupDRpcEnc.php

示例6: SOAP_Value

    {
        # well, lets imagine here some code for adding given mp3track to db or whatever...
        $MethodDebug["rc"] = new SOAP_Value("rc", "boolean", true);
        $MethodDebug["ErrNo"] = new SOAP_Value("ErrNo", "int", (int) 0);
        $MethodDebug["Error"] = new SOAP_Value("Error", "string", "");
        return new SOAP_Value('return', '{urn:MP3DB}AddMP3TrackResult', array("MethodDebug" => new SOAP_Value('MethodDebug', '{urn:MP3DB}MethodDebug', $MethodDebug)));
    }
    function __dispatch($methodname)
    {
        if (isset($this->__dispatch_map[$methodname])) {
            return $this->__dispatch_map[$methodname];
        }
        return NULL;
    }
}
$server = new SOAP_Server();
$server->_auto_translation = true;
$MP3DB_Class = new MP3DB_Class();
$server->addObjectMap($MP3DB_Class, 'urn:MP3DB');
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
    $server->service($HTTP_RAW_POST_DATA);
} else {
    require_once 'SOAP/Disco.php';
    $disco = new SOAP_DISCO_Server($server, "MP3DB");
    header("Content-type: text/xml");
    if (isset($_SERVER['QUERY_STRING']) && strcasecmp($_SERVER['QUERY_STRING'], 'wsdl') == 0) {
        echo $disco->getWSDL();
    } else {
        echo $disco->getDISCO();
    }
    exit;
开发者ID:khrisna,项目名称:eccubedrm,代码行数:31,代码来源:disco_server.php

示例7: run

 /**
  * This runs the web service
  *
  * @static
  * @access public
  */
 function run()
 {
     if (defined('JSON_WEBSERVICE')) {
         $this->runJSON();
         return;
     }
     ob_start();
     $server = new SOAP_Server();
     $server->addObjectMap($this, 'http://schemas.xmlsoap.org/soap/envelope/');
     $request = 'Not Set';
     if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
         $request = file_get_contents("php://input");
         $server->service($request);
     } else {
         // Create the DISCO server
         $disco = new SOAP_DISCO_Server($server, $this->namespace);
         header("Content-type: text/xml");
         if (isset($_SERVER['QUERY_STRING']) && strcasecmp($_SERVER['QUERY_STRING'], 'wsdl') == 0) {
             echo $disco->getWSDL();
         } else {
             echo $disco->getDISCO();
         }
     }
     $capture = ob_get_flush();
     $this->debug($request, 'request', 5);
     $this->debug($capture, 'response', 5);
     global $_KT_starttime;
     $time = number_format(KTUtil::getBenchmarkTime() - $_KT_starttime, 2);
     $this->debug($time, 'time from start', 4);
 }
开发者ID:sfsergey,项目名称:knowledgetree,代码行数:36,代码来源:webservice.php

示例8: SendMessage

<?php

require_once 'SOAP/Server.php';
function SendMessage($array)
{
    //$result = $str." ".date("Y-m-d");
    $params = array('status' => "345", 'errormessage' => "444");
    return $params;
}
$server = new SOAP_Server();
$server->addToMap('SendMessage', array(), array());
$server->service($HTTP_RAW_POST_DATA);
?>
 
开发者ID:honda-kyoto,项目名称:UMS-Kyoto,代码行数:13,代码来源:soap_server.php

示例9: echoStructArray

    function echoStructArray($inputStructArray)
    {
        $ra = array();
        if ($inputStructArray) {
            $c = count($inputStructArray);
            for ($i = 0; $i < $c; $i++) {
                $ra[] = $inputStructArray[$i]->__to_soap('item');
            }
        }
        return $ra;
    }
}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
$groupd = new SOAP_Interop_GroupDImport3();
$server = new SOAP_Server();
$server->_auto_translation = true;
$server->addObjectMap($groupd, 'http://soapinterop/');
$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
$server->bind('http://localhost/soap_interop/wsdl/import3.wsdl.php');
if (isset($_SERVER['SERVER_NAME'])) {
    $server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
} else {
    // allows command line testing of specific request
    $test = '<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:ns4="http://soapinterop.org/xsd"
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:31,代码来源:server_Round3GroupDImport3.php

示例10: echoEmployee

require_once 'SOAP/Server.php';
require_once 'params_classes.php';
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
class SOAP_Interop_GroupDCompound2
{
    function echoEmployee(&$employee)
    {
        return $employee->__to_soap('result_Employee');
    }
}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
$options = array('use' => 'literal', 'style' => 'document');
$groupd = new SOAP_Interop_GroupDCompound2();
$server = new SOAP_Server($options);
$server->_auto_translation = true;
$server->addObjectMap($groupd, 'http://soapinterop.org/employee');
$server->bind('http://localhost/soap_interop/wsdl/compound2.wsdl.php');
if (isset($_SERVER['SERVER_NAME'])) {
    $server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : NULL);
} else {
    $test = '<?xml version="1.0" encoding="UTF-8"?>
    
    <SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:ns4="http://soapinterop.org/person"
     xmlns:ns5="http://soapinterop.org/employee"
    >
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:31,代码来源:server_Round3GroupDCompound2.php

示例11: validRemoteIP

<?php

require_once '../includes.php';
require_once '../classes/classQuota.php';
$check_remoter = validRemoteIP($_SERVER['REMOTE_ADDR']);
$server = new SOAP_Server();
$server->_auto_translation = true;
$classObj = new CQuota($check_remoter);
$server->addObjectMap($classObj, 'urn:CQuota');
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
    $server->service($HTTP_RAW_POST_DATA);
} else {
    require_once 'SOAP/Disco.php';
    $disco = new SOAP_DISCO_Server($server, "CQuota");
    header("Content-type: text/xml");
    if (isset($_SERVER['QUERY_STRING']) && strcasecmp($_SERVER['QUERY_STRING'], 'wsdl') == 0) {
        echo $disco->getWSDL();
    } else {
        echo $disco->getDISCO();
    }
    exit;
}
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:22,代码来源:quota.php

示例12: validRemoteIP

<?php

require_once 'includes.php';
require_once "classVCB.php";
$check_remoter = validRemoteIP($_SERVER['REMOTE_ADDR']);
$server = new SOAP_Server();
$server->_auto_translation = true;
$vcb = new CVCB($check_remoter);
$server->addObjectMap($vcb, 'urn:CVCB');
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
    $server->service($HTTP_RAW_POST_DATA);
} else {
    require_once 'SOAP/Disco.php';
    $disco = new SOAP_DISCO_Server($server, "CVCB");
    header("Content-type: text/xml");
    if (isset($_SERVER['QUERY_STRING']) && strcasecmp($_SERVER['QUERY_STRING'], 'wsdl') == 0) {
        echo $disco->getWSDL();
    } else {
        echo $disco->getDISCO();
    }
    exit;
}
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:22,代码来源:index.php

示例13: error_reporting

<?
// handles remote queries with soap

/*
    *** REQUIREMENTS FOR USING the version of PEAR:SOAP that this code uses: ***
    SOAP-0.9.3
    HTTP_Request >= 1.3.0
    Net_URL >= 1.0.14
*/
if (!defined('DILPS_SOAP_QUERY')) define('DILPS_SOAP_QUERY', 1);
error_reporting(0);  // suppress warnings related to unfound (and unnecessary) soap include files
require_once('./config.inc.php');
require_once("{$config['includepath']}dilpsSoapServer.class.php");
require_once('SOAP/Server.php');

// Create the SOAP server
$soapServer = new SOAP_Server();
$dilpsSoap = new DilpsSoapServer(!$config['utf8']);
$soapServer->addObjectMap($dilpsSoap, 'urn:DILPSQuery');

// Service the request
$status = $soapServer->service($GLOBALS['HTTP_RAW_POST_DATA']);
if (is_a($status, 'SOAP_Fault')) {
    $fault = $response->getFault();
    //mail('brian@mediagonal.ch', 'soapserverFault', var_export($fault));
}
?>
开发者ID:prometheus-ev,项目名称:promdilps,代码行数:27,代码来源:soapquery.php

示例14: SOAP_Fault

                $errorMsg .= $error->toString() . "\n";
            }
            return new SOAP_Fault($errorMsg, 'Client');
        } else {
            $monthname = date('F Y', $Month->getTimeStamp());
            $days = array();
            $Month->build();
            while ($Day =& $Month->fetch()) {
                $day = array('isFirst' => (int) $Day->isFirst(), 'isLast' => (int) $Day->isLast(), 'isEmpty' => (int) $Day->isEmpty(), 'day' => (int) $Day->thisDay());
                $days[] = $day;
            }
            return array('monthname' => $monthname, 'days' => $days);
        }
    }
}
$server = new SOAP_Server();
$server->_auto_translation = true;
$calendar = new Calendar_Server();
$server->addObjectMap($calendar, 'urn:PEAR_SOAP_Calendar');
if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {
    $server->service($GLOBALS['HTTP_RAW_POST_DATA']);
} else {
    require_once 'SOAP' . DIRECTORY_SEPARATOR . 'Disco.php';
    $disco = new SOAP_DISCO_Server($server, "PEAR_SOAP_Calendar");
    if (isset($_SERVER['QUERY_STRING']) && strcasecmp($_SERVER['QUERY_STRING'], 'wsdl') == 0) {
        header("Content-type: text/xml");
        echo $disco->getWSDL();
    } else {
        echo 'This is a PEAR::SOAP Calendar Server. For client try <a href="8.php">here</a><br />';
        echo 'For WSDL try <a href="?wsdl">here</a>';
    }
开发者ID:casan,项目名称:eccube-2_13,代码行数:31,代码来源:7.php

示例15: getSOAPServiceNamespace

class ServerHandler_Round2Base implements SOAP_Service
{
    public static function getSOAPServiceNamespace()
    {
        return 'http://soapinterop.org/';
    }
    public static function getSOAPServiceName()
    {
        return 'ExampleService';
    }
    public static function getSOAPServiceDescription()
    {
        return 'Just a simple example.';
    }
    public static function getWSDLURI()
    {
        return 'http://localhost/soap/tests/interop.wsdl';
    }
    public function echoString($inputString)
    {
        return array('return' => (string) $inputString);
    }
}
$server = new SOAP_Server();
require_once 'ServerHandler_Round2Base.php';
$soapclass = new ServerHandler_Round2Base();
$server->addService($soapclass);
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
    $server->service('php://input');
}
开发者ID:SandyS1,项目名称:presentations,代码行数:30,代码来源:sample-server-handler.php


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