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


PHP soap_server类代码示例

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


在下文中一共展示了soap_server类的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: crearWebServiceUntis

 public static function crearWebServiceUntis()
 {
     $nusoap_server = new soap_server();
     $nusoap_server->configureWSDL('Transferir archivo Untis', 'urn:transferir_archivo_untis');
     // Parametros de entrada
     $nusoap_server->wsdl->addComplexType('datos_entrada', 'complexType', 'struct', 'all', '', array('archivo' => array('name' => 'Archivo', 'type' => 'xsd:base64Binary')));
     // Parametros de Salida
     $nusoap_server->wsdl->addComplexType('datos_salida', 'complexType', 'struct', 'all', '', array('mensaje' => array('name' => 'mensaje', 'type' => 'xsd:string')));
     $nusoap_server->wsdl->addComplexType('anio_lectivo_salida', 'complexType', 'struct', 'all', '', array('mensaje' => array('name' => 'mensaje', 'type' => 'xsd:string')));
     $nusoap_server->register('enviar_xml', array('datos_entrada' => 'tns:datos_entrada'), array('return' => 'tns:datos_salida'), 'urn:transferir_archivo_untis', 'urn:hellowsdl2#enviar_xml', 'rpc', 'encoded', 'La siguiente funcion recibe un archivo y transfiere los datos al servidor');
     $nusoap_server->register('consultar_anio_lectivo_activo', array('datos_entrada' => ''), array('return' => 'tns:anio_lectivo_salida'), 'urn:transferir_archivo_untis', 'urn:hellowsdl3#consultar_anio_lectivo_activo', 'rpc', 'encoded', 'La siguiente funcion envia el año lectivo activo');
     return $nusoap_server;
 }
开发者ID:crodriguezn,项目名称:luis-rodriguez-ec,代码行数:13,代码来源:webservice_helper.php

示例3: __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

示例4: singleton

 /**
  * Singleton method
  */
 public static function singleton()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new soap_server();
         // Set the error handler
         WSCMError::setErrorHandler(new WSCMSoapErrorHandler());
         // Configure the service
         self::$_instance->configureWSDL('WSCMService', 'urn:WSCMService');
     }
     return self::$_instance;
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:14,代码来源:cm_soap.php

示例5: PresentWSDL

 public function PresentWSDL()
 {
     $Namespace = SiteRoot . constant("jf_jPath_Request_Delimiter") . "service" . constant("jf_jPath_Request_Delimiter");
     $Endpoint = HttpRequest::URL(false);
     //SoapClients use this to send request!
     j::$App->LoadSystemModule("plugin.nusoap.nusoap");
     $soap = new soap_server();
     $soap->configureWSDL("Dispatch", $Namespace, $Endpoint);
     //			$Namespace);
     $r = $this->ListFiles(dirname(__FILE__));
     foreach ($r as $k => $v) {
         $this->Register($this->File2Class($v), $soap, $Namespace);
     }
     $soap->service("");
     return true;
 }
开发者ID:michalkoczwara,项目名称:WebGoatPHP,代码行数:16,代码来源:dispatch.php

示例6: NusoapResponse

 function NusoapResponse()
 {
     // force to set global variable $debug
     // before calling parent constructor
     $GLOBALS['debug'] = $this->mDebugMode;
     parent::soap_server();
     $this->configureWsdl(__CLASS__ . 'Service', FALSE, $this->mEndpoint);
     $this->mrDispatcher = Dispatcher::Instance();
     $this->mrSecurity = Security::Instance();
     $this->mrSession = Session::Instance();
     if (!empty($this->mRegisteredFunctions)) {
         foreach ($this->mRegisteredFunctions as $func_name => $params) {
             if (is_array($params) && $params != NULL) {
                 $this->register($func_name, $params['in'], $params['out'], $params['namespace'], $params['soapaction'], $params['style'], $params['use'], $params['documentation'], $params['encodingStyle']);
             } else {
                 $this->register($func_name);
             }
         }
     }
     if (!empty($this->mRegisteredTypes)) {
         foreach ($this->mRegisteredTypes as $type_name => $params) {
             if (is_array($params) && count($params) > 0) {
                 if ($params['type'] == 'complexType' && $params['phptype'] != 'scalar') {
                     $this->wsdl->addComplexType($type_name, $params['type'], $params['phptype'], $params['compositor'], $params['restrictionBase'], $params['elements'], $params['attrs'], $params['arraytype']);
                 } else {
                     $this->wsdl->addSimpleType($type_name, $params['type'], $params['phptype'], $params['compositor'], $params['restrictionBase'], $params['elements'], $params['attrs'], $params['arraytype']);
                 }
             } else {
                 $this->register($func_name);
             }
         }
     }
     $this->wsdl->addComplexType('ListType', 'complexType', 'array');
     $this->wsdl->addComplexType('AgmListType', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'xsd:integer[]')), 'xsd:integer');
 }
开发者ID:rifkiferdian,项目名称:gtfw_boostab,代码行数:35,代码来源:NusoapResponse.class.php

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

示例8: createServer

function createServer()
{
    // *************************************************************************************
    // create the server instance
    // *************************************************************************************
    $server = new soap_server();
    $server->xml_encoding = "UTF-8";
    $server->decode_utf8 = false;
    $server->configureWSDL('DOMAService', NAMESPACE1);
    // *************************************************************************************
    // define complex types
    // *************************************************************************************
    $server->wsdl->addComplexType('PublishMapRequest', 'complexType', 'struct', 'all', '', array('Username' => array('name' => 'Username', 'type' => 'xsd:string'), 'Password' => array('name' => 'Password', 'type' => 'xsd:string'), 'MapInfo' => array('name' => 'Map', 'type' => 'tns:MapInfo')));
    $server->wsdl->addComplexType('PublishMapResponse', 'complexType', 'struct', 'all', '', array('Success' => array('name' => 'Success', 'type' => 'xsd:boolean'), 'ErrorMessage' => array('name' => 'ErrorMessage', 'type' => 'xsd:string'), 'URL' => array('name' => 'URL', 'type' => 'xsd:string')));
    $server->wsdl->addComplexType('PublishPreUploadedMapRequest', 'complexType', 'struct', 'all', '', array('Username' => array('name' => 'Username', 'type' => 'xsd:string'), 'Password' => array('name' => 'Password', 'type' => 'xsd:string'), 'MapInfo' => array('name' => 'Map', 'type' => 'tns:MapInfo'), 'PreUploadedMapImageFileName' => array('name' => 'PreUploadedMapImageFileName', 'type' => 'xsd:string'), 'PreUploadedBlankMapImageFileName' => array('name' => 'PreUploadedBlankMapImageFileName', 'type' => 'xsd:string'), 'PreUploadedThumbnailImageFileName' => array('name' => 'PreUploadedThumbnailImageFileName', 'type' => 'xsd:string')));
    $server->wsdl->addComplexType('PublishPreUploadedMapResponse', 'complexType', 'struct', 'all', '', array('Success' => array('name' => 'Success', 'type' => 'xsd:boolean'), 'ErrorMessage' => array('name' => 'ErrorMessage', 'type' => 'xsd:string'), 'URL' => array('name' => 'URL', 'type' => 'xsd:string')));
    $server->wsdl->addComplexType('UploadPartialFileRequest', 'complexType', 'struct', 'all', '', array('Username' => array('name' => 'Username', 'type' => 'xsd:string'), 'Password' => array('name' => 'Password', 'type' => 'xsd:string'), 'FileName' => array('name' => 'FileName', 'type' => 'xsd:string'), 'Data' => array('name' => 'Data', 'type' => 'xsd:base64Binary')));
    $server->wsdl->addComplexType('UploadPartialFileResponse', 'complexType', 'struct', 'all', '', array('Success' => array('name' => 'Success', 'type' => 'xsd:boolean'), 'ErrorMessage' => array('name' => 'ErrorMessage', 'type' => 'xsd:string'), 'FileName' => array('name' => 'FileName', 'type' => 'xsd:string')));
    $server->wsdl->addComplexType('GetAllMapsRequest', 'complexType', 'struct', 'all', '', array('Username' => array('name' => 'Username', 'type' => 'xsd:string'), 'Password' => array('name' => 'Password', 'type' => 'xsd:string')));
    $server->wsdl->addComplexType('GetAllMapsResponse', 'complexType', 'struct', 'all', '', array('Success' => array('name' => 'Success', 'type' => 'xsd:boolean'), 'ErrorMessage' => array('name' => 'ErrorMessage', 'type' => 'xsd:string'), 'Maps' => array('name' => 'Maps', 'type' => 'tns:MapInfoArray')));
    $server->wsdl->addComplexType('GetAllCategoriesRequest', 'complexType', 'struct', 'all', '', array('Username' => array('name' => 'Username', 'type' => 'xsd:string'), 'Password' => array('name' => 'Password', 'type' => 'xsd:string')));
    $server->wsdl->addComplexType('GetAllCategoriesResponse', 'complexType', 'struct', 'all', '', array('Success' => array('name' => 'Success', 'type' => 'xsd:boolean'), 'ErrorMessage' => array('name' => 'ErrorMessage', 'type' => 'xsd:string'), 'Categories' => array('name' => 'Categories', 'type' => 'tns:CategoryArray')));
    $server->wsdl->addComplexType('ConnectRequest', 'complexType', 'struct', 'all', '', array('Username' => array('name' => 'Username', 'type' => 'xsd:string'), 'Password' => array('name' => 'Password', 'type' => 'xsd:string')));
    $server->wsdl->addComplexType('ConnectResponse', 'complexType', 'struct', 'all', '', array('Success' => array('name' => 'Success', 'type' => 'xsd:boolean'), 'ErrorMessage' => array('name' => 'ErrorMessage', 'type' => 'xsd:string'), 'Version' => array('name' => 'Version', 'type' => 'xsd:string')));
    $server->wsdl->addComplexType('MapInfo', 'complexType', 'struct', 'all', '', array('ID' => array('name' => 'ID', 'type' => 'xsd:int'), 'UserID' => array('name' => 'UserID', 'type' => 'xsd:int'), 'CategoryID' => array('name' => 'CategoryID', 'type' => 'xsd:int'), 'Date' => array('name' => 'Date', 'type' => 'xsd:dateTime'), 'Name' => array('name' => 'Name', 'type' => 'xsd:string'), 'Organiser' => array('name' => 'Organiser', 'type' => 'xsd:string'), 'Country' => array('name' => 'Country', 'type' => 'xsd:string'), 'Discipline' => array('name' => 'Discipline', 'type' => 'xsd:string'), 'RelayLeg' => array('name' => 'RelayLeg', 'type' => 'xsd:string'), 'MapName' => array('name' => 'MapName', 'type' => 'xsd:string'), 'ResultListUrl' => array('name' => 'ResultListUrl', 'type' => 'xsd:string'), 'Comment' => array('name' => 'Comment', 'type' => 'xsd:string'), 'MapImageData' => array('name' => 'MapImageData', 'type' => 'xsd:base64Binary'), 'MapImageFileExtension' => array('name' => 'MapImageFileExtension', 'type' => 'xsd:string'), 'BlankMapImageData' => array('name' => 'BlankMapImageData', 'type' => 'xsd:base64Binary')));
    $server->wsdl->addComplexType('Category', 'complexType', 'struct', 'all', '', array('ID' => array('name' => 'ID', 'type' => 'xsd:int'), 'UserID' => array('name' => 'UserID', 'type' => 'xsd:int'), 'Name' => array('name' => 'Name', 'type' => 'xsd:string')));
    $server->wsdl->addComplexType('MapInfoArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:MapInfo[]')), 'tns:MapInfo');
    $server->wsdl->addComplexType('CategoryArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:Category[]')), 'tns:Category');
    // *************************************************************************************
    // register service methods
    // *************************************************************************************
    $server->register('PublishMap', array('request' => 'tns:PublishMapRequest'), array('response' => 'tns:PublishMapResponse'), NAMESPACE1);
    $server->register('PublishPreUploadedMap', array('request' => 'tns:PublishPreUploadedMapRequest'), array('response' => 'tns:PublishPreUploadedMapResponse'), NAMESPACE1);
    $server->register('UploadPartialFile', array('request' => 'tns:UploadPartialFileRequest'), array('response' => 'tns:UploadPartialFileResponse'), NAMESPACE1);
    $server->register('GetAllMaps', array('request' => 'tns:GetAllMapsRequest'), array('response' => 'tns:GetAllMapsResponse'), NAMESPACE1);
    $server->register('GetAllCategories', array('request' => 'tns:GetAllCategoriesRequest'), array('response' => 'tns:GetAllCategoriesResponse'), NAMESPACE1);
    $server->register('Connect', array('request' => 'tns:ConnectRequest'), array('response' => 'tns:ConnectResponse'), NAMESPACE1);
    return $server;
}
开发者ID:andopor,项目名称:doma-project,代码行数:39,代码来源:webservice.php

示例9: array

    $banco = Cuenta::first('all', array('conditions' => array(' nro_afiliado = ?', $nro_afiliado)));
    // var_dump($client->nombre);
    if ($client != NULL && $tarjeta != NULL && $banco != NULL) {
        $cuentaCliente = Cuenta::first('all', array('conditions' => array(' ci_cliente = ?', $ci)));
        if ($cuentaCliente->nro_afiliado == $tarjeta->nro_afiliado && $cod_seg == $tarjeta->cod_seg) {
            if ($monto <= $cuentaCliente->saldo) {
                $cuentaCliente->saldo = $cuentaCliente->saldo - $monto;
                $cuentaCliente->save();
                $banco->saldo = $banco->saldo + $monto;
                $banco->save();
                Transaccion::create(array('nro_tarjeta' => $nro_tarjeta, 'ci' => $ci, 'fecha_transaccion' => date("Y-m-d H:i:s"), 'monto' => $monto, "nro_afiliado_adquiriente" => $nro_afiliado, 'cod' => "00"));
                return "00";
            } else {
                Transaccion::create(array('nro_tarjeta' => $nro_tarjeta, 'ci' => $ci, 'fecha_transaccion' => date("Y-m-d H:i:s"), 'monto' => $monto, "nro_afiliado_adquiriente" => $nro_afiliado, 'cod' => "01"));
                return "01";
            }
        } else {
            Transaccion::create(array('nro_tarjeta' => $nro_tarjeta, 'ci' => $ci, 'fecha_transaccion' => date("Y-m-d H:i:s"), 'monto' => $monto, "nro_afiliado_adquiriente" => $nro_afiliado, 'cod' => "10"));
            return "10";
        }
    } else {
        Transaccion::create(array('nro_tarjeta' => $nro_tarjeta, 'ci' => $ci, 'fecha_transaccion' => date("Y-m-d H:i:s"), 'monto' => $monto, "nro_afiliado_adquiriente" => $nro_afiliado, 'cod' => "10"));
        return "10";
    }
}
// Se inicializa el servidor.
$server = new soap_server();
$server->configureWSDL("BancoTere", "urn:BancoTere");
$server->register('pago', array("nro_tarjeta" => "xsd:int", "cod_seg" => "xsd:string", "fecha_exp" => "xsd:string", "monto" => "xsd:string", "ci" => "xsd:int", "nro_afiliado" => "xsd:int"), array("return" => "xsd:string"), 'urn:BancoTere', 'urn:BancoTere#pago', 'rpc', 'encoded', 'transacion del banco');
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
开发者ID:Vinz93,项目名称:WS-ECommerce,代码行数:31,代码来源:server.php

示例10: soap_server

<?php

require_once 'biblioteca/lib/nusoap.php';
//Create a new soap server
$server = new soap_server();
$URL = "http:localhost:80/servidor";
$namespace = $URL . '?wsdl';
//using soap_server to create server object
$server = new soap_server();
$server->configureWSDL('servidor', $namespace);
//Define our namespace
/*$server->wsdl->addComplexType(
    'Person',
    'complexType',
    'struct',
    'all',
    '',
    array(
        'id_user' => array('name' => 'id_user', 'type' => 'xsd:int'))
);

*/
//first simple function
$server->register('insertar_persona', array('cedula' => 'xsd:string', 'nombre' => 'xsd:string', 'apellido' => 'xsd:string', 'ruc' => 'xsd:string', 'direccion' => 'xsd:string', 'email' => 'xsd:string', 'telefono' => 'xsd:string', 'fecha' => 'xsd:date', 'ventana' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:Servidor.insertar_persona', 'urn:Servidor.insertar_persona', 'rpc', 'encoded', 'Se inserta en personas');
$server->register('insertar_anamnesis', array('cedula' => 'xsd:string', 'motivo_consulta' => 'xsd:string', 'antecedentes_familiares' => 'xsd:string', 'antecedentes_desarrollo' => 'xsd:string', 'aspectos_generales' => 'xsd:string', 'conclusiones' => 'xsd:string', 'observaciones' => 'xsd:string', 'plan_evaluacion' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:Servidor.insertar_anamnesis', 'urn:Servidor.insertar_anamnesis', 'rpc', 'encoded', 'Se inserta el anamnesis');
$server->register('recuperar_paciente', array('cedula' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:Servidor.recuperar_paciente', 'urn:Servidor.recuperar_paciente', 'rpc', 'encoded', 'Just say hello');
$server->register('recuperar_medico', array('cedula' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:Servidor.recuperar_medico', 'urn:Servidor.recuperar_medico', 'rpc', 'encoded', 'Recuperar');
$server->register('verificar_persona', array('cedula' => 'xsd:string'), array('return' => 'xsd:boolean'), 'urn:Servidor.verificar_persona', 'urn:Servidor.verificar_persona', 'rpc', 'encoded', 'Verificar');
$server->register('facturar', array('fecha' => 'xsd:date', 'iva' => 'xsd:numeric', 'total' => 'xsd:numeric', 'usuario' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:Servidor.facturar', 'urn:Servidor.facturar', 'rpc', 'encoded', 'Facturar');
$server->register('facturar2', array('cedulaP' => 'xsd:string', 'cedulaM' => 'xsd:string', 'fecha' => 'xsd:date', 'horario' => 'xsd:time', 'direccion' => 'xsd:string', 'cantidadH' => 'xsd:integer', 'iva' => 'xsd:numeric', 'total' => 'xsd:numeric', 'usuario' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:Servidor.facturar2', 'urn:Servidor.facturar2', 'rpc', 'encoded', 'Facturar2');
$server->register('verificar_fecha', array('cedulaP' => 'xsd:string', 'cedulaM' => 'xsd:string', 'fecha' => 'xsd:date', 'horario' => 'xsd:time'), array('return' => 'xsd:string'), 'urn:Servidor.verificar_fecha', 'urn:Servidor.verificar_fecha', 'rpc', 'encoded', 'Verificar fecha');
开发者ID:gcaceres93,项目名称:psalud,代码行数:31,代码来源:servidor.php

示例11: Copyright

# Copyright (C) 2004-2007  Victor Boctor - vboctor@users.sourceforge.net
# This program is distributed under dual licensing.  These include
# GPL and a commercial licenses.  Victor Boctor reserves the right to
# change the license of future releases.
# See docs/ folder for more details
# --------------------------------------------------------
# $Id: mantisconnect.php,v 1.1 2007-07-18 06:52:47 vboctor Exp $
# --------------------------------------------------------
$t_current_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR;
$t_nusoap_dir = $t_current_dir . 'nusoap';
# includes nusoap classes
chdir($t_nusoap_dir);
require_once 'nusoap.php';
chdir($t_current_dir);
# create server
$l_oServer = new soap_server();
# namespace
$t_namespace = 'http://futureware.biz/mantisconnect';
# wsdl generation
$l_oServer->debug_flag = false;
$l_oServer->configureWSDL('MantisConnect', $t_namespace);
$l_oServer->wsdl->schemaTargetNamespace = $t_namespace;
// The following will make the default encoding UTF-8 instead of ISO-8859-1
// WS-I Basic Profile requires UTF-8 or UTF-16 as the encoding for interoperabilty
// reasons.  This will correctly handle a large number of languages besides English.
$l_oServer->xml_encoding = "UTF-8";
$l_oServer->soap_defencoding = "UTF-8";
$l_oServer->decode_utf8 = false;
###
###  PUBLIC TYPES
###
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:mantisconnect.php

示例12: soap_server

<?php

//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
开发者ID:ceryxSeidor,项目名称:ProyectoPruebaWSV2,代码行数:31,代码来源:EjWS7_Server.php

示例13: soap_server

<?php

//incluimos la clase nusoap.php
require_once './lib/nusoap.php';
require_once './lib/class.wsdlcache.php';
//creamos el objeto de tipo soap_server
$ns = "http://vlana001sw.esy.es/SistemasWeb/Lab7/php";
$server = new soap_server();
$server->configureWSDL('passVal', $ns);
$server->wsdl->schemaTargetNamespace = $ns;
//registramos la función que vamos a implementar
$server->register('passVal', array('password' => 'xsd:String'), array('x' => 'xsd:String'), $ns);
//implementamos la función
function passVal($password)
{
    $file = fopen("../txt/toppasswords.txt", "r") or die("Error al abrir el fichero toppasswords.txt");
    while (!feof($file)) {
        $line = fgets($file);
        if (strcmp(substr($line, 0, strlen($line) - 2), $password) == 0) {
            fclose($file);
            return "INVALIDA";
        }
    }
    fclose($file);
    return "VALIDA";
}
//llamamos al método service de la clase nusoap
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
开发者ID:vlana001,项目名称:SistemasWeb,代码行数:29,代码来源:ComprobarContrasena.php

示例14: soap_server

<?php

// Pull in the NuSOAP code
require_once 'lib/nusoap.php';
// Create the server instance
$server = new soap_server();
// Initialize WSDL support
$server->configureWSDL('commandinjwsdl', 'urn:commandinjwsdl');
// Register the method to expose
$server->register('commandinj', array('command' => 'xsd:string'), array('return' => 'xsd:string'), 'urn:commandinjwsdl', 'urn:commandinjwsdl#commandinj', 'rpc', 'encoded', 'Returns the results of a command');
// Define the method as a PHP function
function commandinj($command)
{
    exec($command, $output);
    $results = "";
    while (list($key, $val) = each($output)) {
        $results = $results . $val;
    }
    return $results;
}
// Use the request to (try to) invoke the service
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
开发者ID:secureideas,项目名称:samuraiwtf,代码行数:23,代码来源:ws-commandinj.php

示例15: ini_set

require_once 'modules/Emails/mail.php';
require_once 'modules/Users/Users.php';
require_once 'modules/Settings/CustomerPortal/helpers/CustomerPortalPassword.php';
ini_set('error_log', $root_directory . 'cache/logs/yetiportal.log');
/** Configure language for server response translation */
$current_language = vglobal('current_language');
if (!isset($current_language)) {
    $current_language = vglobal('default_language');
}
$log =& LoggerManager::getLogger('portal');
$userid = getPortalUserid();
$user = new Users();
$current_user = $user->retrieveCurrentUserInfoFromFile($userid);
//error_reporting(0);
$NAMESPACE = 'http://www.yetiforce.com';
$server = new soap_server();
$server->configureWSDL('customerportal');
$server->wsdl->addComplexType('common_array', 'complexType', 'array', '', array('fieldname' => array('name' => 'fieldname', 'type' => 'xsd:string')));
$server->wsdl->addComplexType('common_array1', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:common_array[]')), 'tns:common_array');
$server->wsdl->addComplexType('add_contact_detail_array', 'complexType', 'array', '', array('salutation' => array('name' => 'salutation', 'type' => 'xsd:string'), 'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'), 'phone' => array('name' => 'phone', 'type' => 'xsd:string'), 'lastname' => array('name' => 'lastname', 'type' => 'xsd:string'), 'mobile' => array('name' => 'mobile', 'type' => 'xsd:string'), 'parentid' => array('name' => 'parentid', 'type' => 'xsd:string'), 'leadsource' => array('name' => 'leadsource', 'type' => 'xsd:string')));
$server->wsdl->addComplexType('field_details_array', 'complexType', 'array', '', array('fieldlabel' => array('name' => 'fieldlabel', 'type' => 'xsd:string'), 'fieldvalue' => array('name' => 'fieldvalue', 'type' => 'xsd:string')));
$server->wsdl->addComplexType('field_datalist_array', 'complexType', 'array', '', array('fielddata' => array('name' => 'fielddata', 'type' => 'xsd:string')));
$server->wsdl->addComplexType('product_list_array', 'complexType', 'array', '', array('productid' => array('name' => 'productid', 'type' => 'xsd:string'), 'productname' => array('name' => 'productname', 'type' => 'xsd:string'), 'productcode' => array('name' => 'productcode', 'type' => 'xsd:string'), 'commissionrate' => array('name' => 'commissionrate', 'type' => 'xsd:string'), 'qtyinstock' => array('name' => 'qtyinstock', 'type' => 'xsd:string'), 'qty_per_unit' => array('name' => 'qty_per_unit', 'type' => 'xsd:string'), 'unit_price' => array('name' => 'unit_price', 'type' => 'xsd:string')));
$server->wsdl->addComplexType('get_ticket_attachments_array', 'complexType', 'array', '', array('files' => array('fileid' => 'xsd:string', 'type' => 'tns:xsd:string', 'filename' => 'xsd:string', 'type' => 'tns:xsd:string', 'filesize' => 'xsd:string', 'type' => 'tns:xsd:string', 'filetype' => 'xsd:string', 'type' => 'tns:xsd:string', 'filecontents' => 'xsd:string', 'type' => 'tns:xsd:string')));
$server->register('authenticate_user', array('fieldname' => 'tns:common_array'), array('return' => 'tns:common_array'), $NAMESPACE);
$server->register('change_password', array('fieldname' => 'tns:common_array'), array('return' => 'tns:common_array'), $NAMESPACE);
$server->register('create_ticket', array('fieldname' => 'tns:common_array'), array('return' => 'tns:common_array'), $NAMESPACE);
//for a particular contact ticket list
$server->register('get_tickets_list', array('fieldname' => 'tns:common_array'), array('return' => 'tns:common_array'), $NAMESPACE);
$server->register('get_ticket_comments', array('fieldname' => 'tns:common_array'), array('return' => 'tns:common_array'), $NAMESPACE);
$server->register('get_combo_values', array('fieldname' => 'tns:common_array'), array('return' => 'tns:common_array'), $NAMESPACE);
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:31,代码来源:yetiportal.php


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