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


PHP SOAP_Server::addObjectMap方法代码示例

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


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

示例1: array

                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();
    }
}
开发者ID:sayemk,项目名称:a2billing,代码行数:31,代码来源:callback-exec.php

示例2: myCallHandler

$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);
}
$server->setCallHandler('myCallHandler', false);
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();
    }
    exit;
}
开发者ID:khrisna,项目名称:eccubedrm,代码行数:31,代码来源:server2.php

示例3: SOAPStruct

        } 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"
>
<SOAP-ENV:Body>
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:31,代码来源:server_Round3GroupDDocLit.php

示例4: array

        $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"
 xmlns:ns5="http://soapinterop/"
 SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:31,代码来源:server_Round3GroupDImport3.php

示例5: echoStruct

            }
        }
        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: echoString

require_once 'params_classes.php';
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
class SOAP_Interop_GroupDImport1
{
    function echoString($inputString)
    {
        return new SOAP_Value('Result', 'string', $inputString);
    }
}
// http://www.whitemesa.com/r3/interop3.html
// http://www.whitemesa.com/r3/plan.html
$groupd = new SOAP_Interop_GroupDImport1();
$server = new SOAP_Server();
$server->_auto_translation = true;
$server->addObjectMap($groupd, 'http://soapinterop/echoString/');
$server->bind('http://localhost/soap_interop/wsdl/import1.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/echoString/"
 SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:30,代码来源:server_Round3GroupDImport1.php

示例7: dirname

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 {
    $disco = new SOAP_DISCO_Server($server, 'soapCliController');
    header("Content-type: text/xml");
    if (isset($_SERVER['QUERY_STRING']) && strcasecmp($_SERVER['QUERY_STRING'], 'wsdl') == 0) {
        // show only the WSDL/XML output if ?wsdl is set in the address bar
        echo $disco->getWSDL();
开发者ID:ketheriel,项目名称:ETVA,代码行数:31,代码来源:soapcliapi.php

示例8: array

        # 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

示例9: 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

示例10: echoEmployee

// 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"
    >
    <SOAP-ENV:Body>
    
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:30,代码来源:server_Round3GroupDCompound2.php

示例11: 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

示例12: unfound

<?
// 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

示例13: date

            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>';
    }
    exit;
}
开发者ID:casan,项目名称:eccube-2_13,代码行数:31,代码来源:7.php

示例14: 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

示例15: intval

    {
        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);
?>

开发者ID:SandyS1,项目名称:presentations,代码行数:29,代码来源:soap.php


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