コード例 #1
0
ファイル: TCP.php プロジェクト: casan/eccube-2_13
 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;
 }
コード例 #2
0
ファイル: TCP.php プロジェクト: valentijnvenus/geocloud
 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;
 }
コード例 #3
0
ファイル: Email.php プロジェクト: emildev35/processmaker
 function SOAP_Server_Email($send_response = true)
 {
     parent::SOAP_Server();
     $this->send_response = $send_response;
 }
コード例 #4
0
ファイル: server.php プロジェクト: khrisna/eccubedrm
// | 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 <*****@*****.**>                           |
// +----------------------------------------------------------------------+
//
// $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();
コード例 #5
0
            }
        }
        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);
コード例 #6
0
ファイル: disco_server.php プロジェクト: khrisna/eccubedrm
    {
        # 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;
コード例 #7
0
ファイル: webservice.php プロジェクト: sfsergey/knowledgetree
 /**
  * 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);
 }
コード例 #8
0
ファイル: soap_server.php プロジェクト: honda-kyoto/UMS-Kyoto
<?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);
?>
 
コード例 #9
0
    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"
コード例 #10
0
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"
    >
コード例 #11
0
ファイル: quota.php プロジェクト: quangbt2005/vhost-kis
<?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;
}
コード例 #12
0
ファイル: index.php プロジェクト: quangbt2005/vhost-kis
<?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;
}
コード例 #13
0
ファイル: soapquery.php プロジェクト: prometheus-ev/promdilps
<?
// 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('*****@*****.**', 'soapserverFault', var_export($fault));
}
?>
コード例 #14
0
ファイル: 7.php プロジェクト: casan/eccube-2_13
                $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>';
    }
コード例 #15
0
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');
}
コード例 #16
0
        if (is_object($inputStruct) && strtolower(get_class($inputStruct)) == 'soapstruct') {
            return $inputStruct->__to_soap($ns . 'echoStructReturn');
        } else {
            if (is_object($inputStruct)) {
                $inputStruct = get_object_vars($inputStruct);
            }
            $struct = new SOAPStruct($inputStruct['varString'], $inputStruct['varInt'], $inputStruct['varFloat']);
            return $struct->__to_soap($ns . 'echoStructReturn');
        }
    }
}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
$options = array('use' => 'literal', 'style' => 'document');
$groupd = new SOAP_Interop_GroupDDocLit();
$server = new SOAP_Server($options);
$server->_auto_translation = true;
$server->addObjectMap($groupd, 'http://soapinterop.org/WSDLInteropTestDocLit');
$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');
$server->bind('http://localhost/soap_interop/wsdl/InteropTestDocLit.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"
コード例 #17
0
// | 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 <*****@*****.**>                           |
// +----------------------------------------------------------------------+
//
// $Id: server_Round3GroupD.php 7 2010-01-22 18:14:51Z acio $
//
require_once 'SOAP/Server.php';
require_once 'interop_Round3GroupD.php';

// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html

$groupd = new SOAP_Interop_GroupD();
$server = new SOAP_Server;
$server->_auto_translation = true;

$server->addObjectMap($groupd, 'http://soapinterop/');
$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');

$server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : NULL);

$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"
>
コード例 #18
0
        } else {
            if (is_object($inputStruct)) {
                $inputStruct = get_object_vars($inputStruct);
            }
            $struct = new SOAPStruct($inputStruct['varString'], $inputStruct['varInt'], $inputStruct['varFloat']);
            return $struct->__to_soap('Result');
        }
    }
   
}

// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html

$groupd = new SOAP_Interop_GroupDImport2();
$server = new SOAP_Server();
$server->_auto_translation = true;

$server->addObjectMap($groupd, 'http://soapinterop/');
$server->addObjectMap($groupd, 'http://soapinterop.org/xsd');

if (isset($_SERVER['SERVER_NAME'])) {
    $baseurl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/soap_interop/';
    $server->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : null);
} else {
    $baseurl = 'http://localhost/soap_interop/';
    $server->bind($baseurl.'wsdl/import2.wsdl.php');
    // 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/"
コード例 #19
0
ファイル: callback-exec.php プロジェクト: sayemk/a2billing
                // SUCCEED INSERT
                write_log(LOG_CALLBACK, basename(__FILE__) . ' line:' . __LINE__ . "[" . date("Y/m/d G:i:s", mktime()) . "] " . " CALLBACK INSERTED -> \n QUERY=" . $QUERY);
                return array($insert_id_callback, 'result=Success', " Success - Callback request has been accepted ");
            } else {
                $error_msg = 'Error : You don t have enough credit to call you back !!!';
            }
        } else {
            $error_msg = 'Error : There is no route to call back your phonenumber !!!';
        }
        // CALLBACK FAIL
        write_log(LOG_CALLBACK, "error_msg = {$error_msg}");
        return array($insert_id_callback, 'result=Error', " ERROR - {$error_msg}");
    }
}
// end Class
$server = new SOAP_Server();
$webservice = new Callback();
// TEST WITH SOAP
// $webservice -> Request(md5(API_SECURITY_KEY), '1234567896', '2342354324', '223424234', $callback_time, $uniqueid);
// exit;
$server->addObjectMap($webservice, 'http://schemas.xmlsoap.org/soap/envelope/');
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
    $server->service($HTTP_RAW_POST_DATA);
} else {
    // Create the DISCO server
    $disco = new SOAP_DISCO_Server($server, 'Callback');
    header("Content-type: text/xml");
    if (isset($_SERVER['QUERY_STRING']) && strcasecmp($_SERVER['QUERY_STRING'], 'wsdl') == 0) {
        echo $disco->getWSDL();
    } else {
        echo $disco->getDISCO();
コード例 #20
0
ファイル: soapcliapi.php プロジェクト: ketheriel/ETVA
/* Include PEAR::SOAP's SOAP_Server class: */
require_once 'SOAP/Server.php';
require_once 'SOAP/Disco.php';
define('SF_ROOT_DIR', realpath(dirname(__FILE__) . '/..'));
define('SF_APP', 'app');
define('SF_ENVIRONMENT', 'soap');
define('SF_DEBUG', true);
require_once 'SOAP/Server.php';
//require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
require_once dirname(__FILE__) . '/../config/ProjectConfiguration.class.php';
$configuration = ProjectConfiguration::getApplicationConfiguration('app', 'prod', false);
sfContext::createInstance($configuration);
$webservice = new soapCliController();
/* Create a new SOAP server using PEAR::SOAP's SOAP_Server class: */
$server = new SOAP_Server();
/* Create an instance of our class: */
//  $webservice = new mySoapServer();
/* Register this instance to the server class: */
// $server->addObjectMap($soaphelloserver,array('namespace'=> 'urn:helloworld'));
$server->addObjectMap($webservice, 'urn:soapCliController');
// $server = new Soap_Server(); //this file is defined in the next step
// $server->addObjectMap($soap_c,array('namespace'=> 'urn:soapapi'));
// $server->setClass("mySoapController"); // more to come on this one
// $server->handle();
// set the path finder class as default responder for the WSDL class
// $server->addObjectMap($webservice,'http://schemas.xmlsoap.org/soap/envelope/');
// start serve
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
    $server->service($HTTP_RAW_POST_DATA);
} else {
コード例 #21
0
ファイル: server2.php プロジェクト: khrisna/eccubedrm
// | 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 <*****@*****.**>                           |
// +----------------------------------------------------------------------+
//
// $Id: server2.php,v 1.3 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;
/* This is a simple example of implementing a custom
   call handler.  If you do this, the soap server will ignore
   objects or functions added to it, and will call your handler
   for **ALL** soap calls the server receives, wether the call
   is defined in your WSDL or not.  The handler receives two
   arguments, the method name being called, and the arguments
   sent for that call.
*/
function myCallHandler($methodname, $args)
{
    global $soapclass;
    return @call_user_func_array(array($soapclass, $methodname), $args);
}
コード例 #22
0
ファイル: soap.php プロジェクト: SandyS1/presentations
    {
        return $this->_dometallopdb($metal, $mode, $count, true);
    }
    function _dometallopdb($metal, $mode, $count, $rss = false)
    {
        $count = intval($count);
        if ($count <= 0) {
            trigger_error("Parameter count must be an integer > 0, value sent: {$count}", E_USER_ERROR);
        }
        $result = @getPDBFromMetal($metal, $mode, $count);
        if (is_object($result) && DB::isError($result)) {
            trigger_error($result->getMessage(), E_USER_ERROR);
        } elseif ($result == false) {
            trigger_error('No results were found', E_USER_WARNING);
        } else {
            if ($rss) {
                $pkt = toRSS(&$result);
                return new SOAP_Value('result', 'base64', base64_encode($pkt));
            } else {
                return new SOAP_Value('result', 'Struct', $result);
            }
        }
    }
}
$server = new SOAP_Server();
$mdb_services = new MDB_SOAP_Services($ns);
$server->addObjectMap($mdb_services);
$server->service($HTTP_RAW_POST_DATA);
?>