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


PHP soap_server::service方法代码示例

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


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

示例1: soapAction

 public function soapAction()
 {
     $server = new soap_server();
     $server->configureWSDL('productservice', 'urn:ProductModel', URL . 'product/soap');
     $server->wsdl->schemaTargetNamespaces = 'urn:ProductModel';
     $server->wsdl->addComplexType('Producto', 'complexType', 'struct', 'all', '', array('idproducto' => array('name' => 'idproducto', 'type' => 'xsd:string'), 'titulo' => array('name' => 'titulo', 'type' => 'xsd:string'), 'descripcion' => array('name' => 'descripcion', 'type' => 'xsd:string'), 'precio' => array('name' => 'precio', 'type' => 'xsd:integer'), 'gatosdeenvio' => array('name' => 'gatosdeenvio', 'type' => 'xsd:integer'), 'marca' => array('name' => 'marca', 'type' => 'xsd:string'), 'createdAt' => array('name' => 'createdAt', 'type' => 'xsd:string'), 'iddescuento' => array('name' => 'iddescuento', 'type' => 'xsd:string'), 'idcolor' => array('name' => 'idcolor', 'type' => 'xsd:string'), 'idtalla' => array('name' => 'idtalla', 'type' => 'xsd:string'), 'stock' => array('name' => 'stock', 'type' => 'xsd:string'), 'idsubcategoria' => array('name' => 'idsubcategoria', 'type' => 'xsd:string'), 'idimagen' => array('name' => 'idimagen', 'type' => 'xsd:integer'), 'path' => array('name' => 'path', 'type' => 'xsd:string')));
     $server->wsdl->addComplexType('Productos', 'complexType', 'array', 'sequence', '', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:Producto[]')), 'tns:Producto');
     $server->register("ProductModel.selecWithCategorySubcatAndProduct", array("category" => "xsd:string", "subcategory" => "xsd:string", "group" => "xsd:string"), array("return" => "tns:Productos"), "urn:ProductModel", "urn:ProductModel#selecWithCategorySubcatAndProduct", "rpc", "encoded", "Get products by category or subcategory");
     $server->register("ProductModel.toArray", array("id" => "xsd:string"), array("return" => "xsd:Array"), "urn:ProductModel", "urn:ProductModel#toArray", "rpc", "encoded", "Get products id or all");
     $POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
     @$server->service($POST_DATA);
 }
开发者ID:GNURub,项目名称:daw2,代码行数:12,代码来源:Product.controller.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->library('nusoap');
     $servicio = new soap_server();
     $servicio->soap_defencoding = 'UTF-8';
     $servicio->decode_utf8 = false;
     $servicio->encode_utf8 = true;
     $ns = "urn:cero_code";
     $servicio->configureWSDL("cero_codeWS", $ns);
     $servicio->schemaTargetNamespace = $ns;
     $servicio->register("get_code", array('id_usuario' => 'xsd:string'), array('return' => 'xsd:string'), $ns, false, 'rpc', 'encoded', 'Cero Code');
     function get_code($id_usuario)
     {
         $CI =& get_instance();
         $CI->load->model('inventario/Inventario_model');
         $codigo = $CI->Inventario_model->get_code($id_usuario);
         return $codigo;
     }
     // 		$servicio->wsdl->addComplexType('Usuario','complexType','struct','all','',
     // array( 'id' => array('name' => 'id','type' => 'xsd:int'),
     // 'usuario' => array('name' => 'usuario','type' => 'xsd:string')));
     $servicio->register("get_usuarios", array(), array('return' => 'xsd:string'), $ns, false, 'rpc', 'encoded', 'Cero Code');
     function get_usuarios()
     {
         $CI =& get_instance();
         $CI->load->model('login/Login_model');
         //$usuarios = new stdClass();
         //$usuarios->lista = $CI->Login_model->get_usuarios();
         $usuarios = $CI->Login_model->get_usuarios();
         return json_encode($usuarios);
     }
     $servicio->service(file_get_contents("php://input"));
 }
开发者ID:ramonluis1987,项目名称:cero_code,代码行数:34,代码来源:soap_servidor.php

示例3: server

 public static function server()
 {
     $server = new \soap_server();
     //$namespace = "http://localhost:8000/ws";
     $server->configureWSDL('server.hello', 'urn:server.hello', Request::url());
     //$server->configureWSDL('OverService',$namespace);
     $server->wsdl->schemaTargetNamespace = 'urn:server.hello';
     //$server->decode_utf8 = true;
     //$server->soap_defencoding = "UTF-8";
     $server->register('hello', array('name' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:server.hello', 'urn:server.hello#hello', 'rpc', 'encoded', 'Retorna o nome');
     function hello($name)
     {
         return 'Hello ' . $name;
     }
     // respuesta para uso do serviço
     return Response::make($server->service(file_get_contents("php://input")), 200, array('Content-Type' => 'text/xml; charset=ISO-8859-1'));
 }
开发者ID:lcalderonc,项目名称:hdc2016,代码行数:17,代码来源:Asunto.php

示例4: funcionEjWS7

//Llamar a la librería que corresponde
require_once "lib/nusoap.php";
//Declaramos el NameSpace
$namespace = "urn:EjWS7_Server";
//Creamos el servidor con el que vamos a trabajar
$server = new soap_server();
//Configuramos el WSDL
$server->configureWSDL("EjWS7_Server");
//Asignamos nuestro NameSpace
$server->wsdl->schemaTargetNameSpace = $namespace;
//Registramos el método para que sea léido por el sistema
//El formato es register(nombreMetodo, parametrosEntrada, parametrosSalida, namespace, soapaction, style, uso, descripcion)
//nombreMetodo: Es el nombre el método.
//parametrosEntrada: Van dentro de un arreglo, así: array('param1'=>'xsd:string', 'param2'=>'xsd:int')
//parametrosSalida: Van igual que los parametros de Entrada. Por defecto: array('return'=>'xsd:string')
//namespace: Colocamos el namespace que obtuvimos anteriormente.
//soapaction: Ocupamos la por defecto: false
//style: Estilo, tenemos rpc o document.
//use: encoded o literal.
//description: Descripción del método.
$server->register('funcionEjWS7', array("nroTramite" => "xsd:int"), array("vigenciaTramite" => "xsd:boolean", "cuponPago" => "xsd:string", "valorTramite" => "xsd:string"), $namespace, false, 'rpc', 'encoded', 'Descripcion Ejemplo Tres');
//creamos el metodo, el nombre del método debe calzar con lo que colocamos anteriormente en register.
function funcionEjWS7($nroTramite)
{
    return array("vigenciaTramite" => true, "cuponPago" => "Uno", "valorTramite" => "dos");
}
// Se envía la data del servicio en caso de que este siendo consumido por un cliente.
$POST_DATA = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '';
// Enviamos la data a través de SOAP
$server->service($POST_DATA);
exit;
开发者ID:ceryxSeidor,项目名称:ProyectoPruebaWSV2,代码行数:31,代码来源:EjWS7_Server.php

示例5:

 function soap_serve($wsdl, $functions)
 {
     global $HTTP_RAW_POST_DATA;
     $s = new soap_server($wsdl);
     $s->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '');
 }
开发者ID:ajv,项目名称:Offline-Caching,代码行数:6,代码来源:soaplib.php

示例6: concatenate

<?php 
	require_once("lib/nusoap.php"); 
	function concatenate($str1,$str2) {
		if (is_string($str1) && is_string($str2))
			return $str1 . $str2;
		else
			return new soap_fault(' 客户端 ','','concatenate 函数的参数应该是两个字符串 ');
	}
	$soap = new soap_server;
	$soap->register('concatenate');
	$soap->service($HTTP_RAW_POST_DATA);
?> 
开发者ID:pf5512,项目名称:phpstudy,代码行数:12,代码来源:nusoap_server.php

示例7: array

    $errors_returned = array(0 => 'success', 1 => 'file import does not exist', 2 => 'no users to import', 3 => 'wrong datas in file', 4 => 'security error');
    // Check whether this script is launch by server and security key is ok.
    if (empty($_SERVER['REMOTE_ADDR']) || $_SERVER['REMOTE_ADDR'] != $_SERVER['SERVER_ADDR'] || $security_key != $_configuration['security_key']) {
        return $errors_returned[4];
    }
    // Libraries
    require_once 'import.lib.php';
    // Check is users file exists.
    if (!is_file($filepath)) {
        return $errors_returned[1];
    }
    // Get list of users
    $users = parse_csv_data($filepath);
    if (count($users) == 0) {
        return $errors_returned[2];
    }
    // Check the datas for each user
    $errors = validate_data($users);
    if (count($errors) > 0) {
        return $errors_returned[3];
    }
    // Apply modifications in database
    save_data($users);
    return $errors_returned[0];
    // Import successfull
}
$server = new soap_server();
$server->register('import_users_from_file');
$http_request = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($http_request);
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:30,代码来源:service.php

示例8: if

				//allow XSS by not encoding output
				$lTargetHostText = $pTargetHost;	    		
	    	}//end if
		    	
		}catch(Exception $e){
			echo $CustomErrorHandler->FormatError($e, "Error setting up configuration on page dns-lookup.php");
		}// end try	
		
	    try{
	    	$lResults = "";
	    	if ($lTargetHostValidated){
	    		$lResults .= '<results host="'.$lTargetHostText.'">';
    			$lResults .=  shell_exec("nslookup " . $pTargetHost);
    			$lResults .= '</results>';
				$LogHandler->writeToLog("Executed operating system command: nslookup " . $lTargetHostText);
	    	}else{
	    		$lResults .= "<message>Validation Error</message>";
	    	}// end if ($lTargetHostValidated){
			
	    	return $lResults;
	    	
    	}catch(Exception $e){
			echo $CustomErrorHandler->FormatError($e, "Input: " . $pTargetHost);
    	}// end try
		
	}//end function

	// Use the request to (try to) invoke the service
	$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
	$lSOAPWebService->service($HTTP_RAW_POST_DATA);
?>
开发者ID:neelaryan,项目名称:mutillidae,代码行数:31,代码来源:ws-lookup-dns-record.php

示例9: substr

                    $anex_codigo = $radicado . "_" . substr("00000" . $anex_numero, -5);
                    $query = "SELECT ANEX_TIPO_CODI FROM ANEXOS_TIPO WHERE ANEX_TIPO_EXT='{$extension}'";
                    $tmp_anex_tipo = $conn->GetOne($query);
                    $anex_tipo = empty($tmp_anex_tipo) ? "0" : $tmp_anex_tipo;
                    $fechaAnexado = $conn->OffsetDate(0, $conn->sysTimeStamp);
                    $query = "INSERT INTO ANEXOS\n                                (ANEX_CODIGO, ANEX_RADI_NUME, ANEX_TIPO, ANEX_TAMANO, ANEX_SOLO_LECT,\n                                ANEX_CREADOR, ANEX_DESC, ANEX_NUMERO, ANEX_NOMB_ARCHIVO, ANEX_ESTADO,\n                                SGD_REM_DESTINO, ANEX_FECH_ANEX, ANEX_BORRADO)\n                            VALUES\n                                ('{$anex_codigo}', {$radicado}, {$anex_tipo}, " . round($anex_tamano / 1024, 2) . ", 'n',\n                                '{$usrRadicador}','{$descripcion}', {$anex_numero}, '{$anex_codigo}.{$extension}', 0,\n                                1, {$fechaAnexado}, 'N')";
                    $nuevoNombreArchivo = "{$anex_codigo}.{$extension}";
                }
            }
            if ($validaOk) {
                $rs = $conn->Execute($query);
                $ok_r = rename("{$ruta}{$nombreArchivo}", "{$ruta}{$nuevoNombreArchivo}");
                if ($rs === false || $ok_r === false) {
                    return new soap_fault('Server', '', "Error en la actualizacion en BD. <!-- {$ok_r} -->");
                }
                return $rs ? $validaOk : $rs;
            } else {
                return new soap_fault('Client', '', 'Los siguientes errores fueron hallados:<br>' . implode('<br>', $cadError));
            }
        } else {
            return new soap_fault('Client', '', 'Radicado debe ser numerico.');
        }
    }
}
if (isset($HTTP_RAW_POST_DATA)) {
    $input = $HTTP_RAW_POST_DATA;
} else {
    $input = implode("\r\n", file('php://input'));
}
$objServer->service($input);
exit;
开发者ID:kractos26,项目名称:orfeo,代码行数:31,代码来源:server.php

示例10: array

/*@@@@@@@@@@@@@@@@@@ SPORTS @@@@@@@@@@@@@@@@@@@*/
$server->wsdl->addComplexType('ArrayOfString', 'complexType', 'array', 'sequence', '', array('itemName' => array('name' => 'itemName', 'type' => 'xsd:string', 'minOccurs' => '0', 'maxOccurs' => 'unbounded')));
/************************************************************************************/
/******************************** FUNCTIONS REGISTER ********************************/
/************************************************************************************/
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@ TESTS @@@@@@@@@@@@@@@@@@*/
$server->register('sayHello', array('input' => 'xsd:string'), array('return' => 'xsd:string'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#sayHello', 'rpc', 'encoded', 'Return the square of a number');
$server->register('Square', array('input' => 'xsd:int'), array('return' => 'xsd:int'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#Square', 'rpc', 'encoded', 'Return the square of a number');
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@ EVENTS @@@@@@@@@@@@@@@@@@*/
$server->register('AddEvent', array('sport' => 'xsd:string', 'owner' => 'xsd:int', 'visibility' => 'xsd:string', 'date_time' => 'xsd:string', 'duration' => 'xsd:int', 'location' => 'xsd:string', 'longitude' => 'xsd:float', 'latitude' => 'xsd:float', 'description' => 'xsd:string'), array('return' => 'xsd:int'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#AddEvent', 'rpc', 'encoded', 'Add a new event in the data base');
$server->register('GetEventsId', array('visibility' => 'xsd:string', 'sports_string' => 'xsd:string', 'id_user' => 'xsd:int'), array('return' => 'tns:ArrayOfInt'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#GetEventsId', 'rpc', 'encoded', 'Returns a list of all the visible events\' id');
$server->register('GetEvent', array('id_event' => 'xsd:int'), array('return' => 'xsd:string'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#GetEvent', 'rpc', 'encoded', 'Returns a structure of an event');
$server->register('GetInvolvedIn', array('id_event' => 'xsd:int'), array('return' => 'xsd:string'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#GetInvolvedIn', 'rpc', 'encoded', 'Returns all the involved users of an event');
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@ USERS @@@@@@@@@@@@@@@@@@*/
$server->register('AddUser', array('external_id' => 'xsd:string', 'log_manager' => 'xsd:string', 'full_name' => 'xsd:string', 'url_avatar' => 'xsd:string', 'gender' => 'xsd:string', 'date_of_birth' => 'xsd:string'), array('return' => 'xsd:int'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#AddUser', 'rpc', 'encoded', 'Try to add an external user to the data base.The internal id of the new user is returned. If the user was already registered, the function just return his internal id. In case of fail, returns -1;');
$server->register('IsUser', array('log_manager' => 'xsd:string', 'external_id' => 'xsd:string'), array('return' => 'xsd:int'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#IsUser', 'rpc', 'encoded', 'indicates whether the input external user is already member of RioSport');
$server->register('GetUser', array('id_user' => 'xsd:int'), array('return' => 'tns:friend'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#GetUser', 'rpc', 'encoded', 'Returns all the informations about an user. Returns null if this user does not exist');
$server->register('GetPracticedSports', array('id_user' => 'xsd:int'), array('return' => 'tns:ArrayOfString'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#GetPracticedSports', 'rpc', 'encoded', 'Returns a list of the practiced sports by the user. It is returned in an array of string. The 0 and paired indices are the sports and the impaired indices are the level of the previous sport.');
$server->register('GetInternalId', array('log_manager' => 'xsd:string', 'external_id' => 'xsd:string'), array('return' => 'xsd:int'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#GetInternalId', 'rpc', 'encoded', 'returns the internal id of an user. In case of fail, returns -1.');
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@ FRIENDS @@@@@@@@@@@@@@@@@@*/
$server->register('GetFriendsOf', array('id_user' => 'xsd:int'), array('return' => 'tns:ArrayOfInt'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#GetFriendsOf', 'rpc', 'encoded', 'Return all the friends of the requested user');
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@@@@@@@@@@@@@@@@@@ SPORTS @@@@@@@@@@@@@@@@@@@*/
$server->register('GetSports', array(), array('return' => 'tns:ArrayOfString'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#GetSports', 'rpc', 'encoded', 'Returns the list of available sports');
$server->register('GetLevels', array(), array('return' => 'tns:ArrayOfString'), $NAMESPACE, 'https://www.etud.insa-toulouse.fr/~pamaury/webService#GetLevels', 'rpc', 'encoded', 'Returns the list of available sports');
$server->service(isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : '');
开发者ID:RemiPrevost,项目名称:RJ,代码行数:30,代码来源:soap_wsdl.php

示例11: Validate

<?php

require_once '../lib/nusoap.php';
$targetNamespace = 'http://localhost/simplesoap/server/';
$serverAuth = new soap_server();
$serverAuth->configureWSDL('Validate', $targetNamespace);
$serverAuth->wsdl->schemaTargetNamespace = $targetNamespace;
$serverAuth->register('Validate', ['username' => 'xsd:string', 'password' => 'xsd:string'], ['return' => 'xsd:Array'], $targetNamespace);
function Validate($username, $password)
{
    $connection = mysqli_connect('localhost', 'root', 'marwek', 'trying');
    $query = "SELECT user_alias,user_name,user_level FROM users WHERE user_name = '{$username}'";
    $result = mysqli_query($connection, $query);
    $numsRow = mysqli_num_rows($result);
    if ($numsRow == 1) {
        $row = mysqli_fetch_assoc($result);
        return $row;
    } else {
        return 'Fails';
    }
}
$rawPostData = file_get_contents('php://input');
$serverAuth->service($rawPostData);
开发者ID:hujianto,项目名称:simplesoap,代码行数:23,代码来源:serverAuth.php

示例12: nbsp

        $desc .= nbsp(4) . ")" . "<br />";
    } else {
        $desc .= "[data] => sekumpulan array data <br />";
        $desc .= nbsp(4) . "array (" . "<br />";
        $desc .= nbsp(8) . "[idx] => array (" . "<br />";
        $i = 0;
        foreach ($service['fields'] as $field) {
            $desc .= nbsp(12) . "[" . $i++ . "] => [data " . $field . "]<br />";
        }
        $desc .= nbsp(8) . ")" . "<br />";
        $desc .= nbsp(4) . ")" . "<br />";
    }
    $desc .= "[fields] => informasi fields data yang di-return-kan ";
    if ($service['type'] == singledata) {
        $desc .= "=> " . $service['fields'][0] . "<br />";
    } else {
        $desc .= "<br />";
        $desc .= nbsp(4) . "array (" . "<br />";
        $i = 0;
        foreach ($service['fields'] as $field) {
            $desc .= nbsp(8) . "[" . $i++ . "] => " . $field . "<br />";
        }
        $desc .= nbsp(4) . ")" . "<br />";
    }
    $desc .= "</blockquote>";
    $desc .= "</blockquote>";
    $ws_serv->register($method, $input, $output, $namespace, $soapaction, $style, $use, $desc);
}
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : "";
$ws_serv->service($HTTP_RAW_POST_DATA);
开发者ID:ratno,项目名称:ratno_ws,代码行数:30,代码来源:index.php

示例13: array

        $pre = 'xsd';
        $ct = 'string';
    } else {
        if (is_integer($GLOBALS['res'])) {
            $pre = 'xsd';
            $ct = 'integer';
        } else {
            if (is_float($GLOBALS['res'])) {
                $pre = 'xsd';
                $ct = 'decimal';
            } else {
                if (is_bool($GLOBALS['res'])) {
                    $pre = 'xsd';
                    $ct = 'boolean';
                } else {
                    if (!$GLOBALS['res']) {
                        $pre = 'xsd';
                        $ct = 'string';
                        $GLOBALS['res'] = '_null_';
                    }
                }
            }
        }
    }
}
// var_error_log($res);
// error_log("{$pre}:{$ct}");
eval("\n    function {$c}(\$parameters = null) {\n        return \$GLOBALS['res'];\n    }\n");
$server->register($c, array(), array('return' => "{$pre}:{$ct}"), 'CENTER', false, 'rpc', 'encoded', 'Servicio dinamico');
$server->service($xml);
exit;
开发者ID:axoquen,项目名称:tt780,代码行数:31,代码来源:soap.php

示例14: scandir

<?php

include_once '../kernel.php';
$tmp_files = scandir('../web_service');
$modules = array();
$functions = array();
$functions_def = array();
foreach ($tmp_files as $fn) {
    if (strpos($fn, '.') !== 0 && $fn != '') {
        $modules[] = $fn;
        $tmp = explode('.', $fn);
        $functions[] = $tmp[0];
        $functions_def[] = $tmp[0] . '_def';
    }
}
require_once '../class/nusoap.php';
foreach ($modules as $module) {
    require_once '../web_service/' . $module;
}
$server = new soap_server();
$server->configureWSDL('test_wsdl', 'urn:test_wsdl');
$server->soap_defencoding = 'UTF-8';
foreach ($functions as $i => $function) {
    $pars = $functions_def[$i]();
    $server->register($function, $pars[0], $pars[1], $pars[2], $pars[3], $pars[4], $pars[5], $pars[6]);
}
$request = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($request);
开发者ID:hscomp2002,项目名称:superp,代码行数:28,代码来源:mywsdl.php

示例15: incoming

    $l_oServer->decode_utf8 = false;
    ###
    ###  IMPLEMENTATION
    ###
    # pass incoming (posted) data
    if (isset($HTTP_RAW_POST_DATA)) {
        $t_input = $HTTP_RAW_POST_DATA;
    } else {
        $t_input = implode("\r\n", file('php://input'));
    }
    # only include the MantisBT / MantisConnect related files, if the current
    # request is a webservice call (rather than webservice documentation request,
    # eg: WSDL).
    if (mci_is_webservice_call()) {
        require_once 'mc_core.php';
    } else {
        # if we have a documentation request, do some tidy up to prevent lame bot loops e.g. /mantisconnect.php/mc_enum_etas/mc_project_get_versions/
        $parts = explode('mantisconnect.php/', strtolower($_SERVER['SCRIPT_NAME']), 2);
        if (isset($parts[1]) && strlen($parts[1]) > 0) {
            echo 'This is not a SOAP webservice request, for documentation, see ' . $parts[0] . 'mantisconnect.php';
            exit;
        }
    }
    # Execute whatever is requested from the webservice.
    $l_oServer->service($t_input);
} else {
    require_once 'mc_core.php';
    $server = new SoapServer("mantisconnect.wsdl", array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS));
    $server->addFunction(SOAP_FUNCTIONS_ALL);
    $server->handle();
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:31,代码来源:mantisconnect.php


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