本文整理汇总了PHP中soap_server::configureWSDL方法的典型用法代码示例。如果您正苦于以下问题:PHP soap_server::configureWSDL方法的具体用法?PHP soap_server::configureWSDL怎么用?PHP soap_server::configureWSDL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类soap_server
的用法示例。
在下文中一共展示了soap_server::configureWSDL方法的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);
}
示例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;
}
示例3: 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;
}
示例4: __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"));
}
示例5: dumpWSDL
public function dumpWSDL()
{
// Instantiate server object
$server = new soap_server();
$server->configureWSDL($this->serviceName, $this->uri, false, 'rpc', 'http://schemas.xmlsoap.org/soap/http', $this->uri);
$this->appendMethods($server);
// Call the service method to initiate the transaction and send the response
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
}
示例6: 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;
}
示例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'));
}
示例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;
}
示例9: getSOAPServer
function getSOAPServer()
{
$namespace = 'http://www.w3.org/2001/XMLSchema';
$server = new soap_server();
$server->debug_flag = false;
$server->configureWSDL("FormaSOAP", $namespace);
$server->wsdl->schemaTargetNamespace = $namespace;
//----------------------------------------------------------------------------
//register types
$server->wsdl->addComplexType('customFieldName', 'complexType', 'struct', 'all', '', array('id' => array('name' => 'id', 'type' => 'xsd:int'), 'name' => array('name' => 'name', 'type' => 'xsd:string')));
$server->wsdl->addComplexType('customFieldValue', 'complexType', 'struct', 'all', '', array('id' => array('name' => 'id', 'type' => 'xsd:int'), 'value' => array('name' => 'value', 'mixed' => 'true', 'type' => 'xsd:string')));
$server->wsdl->addComplexType('customField', 'complexType', 'struct', 'all', '', array('id' => array('name' => 'id', 'type' => 'xsd:int'), 'name' => array('name' => 'name', 'type' => 'xsd:string'), 'value' => array('name' => 'value', 'mixed' => 'true', 'type' => 'xsd:string')));
$server->wsdl->addComplexType('customFieldValuesArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'customFieldValue[]')), 'customFieldValue');
$server->wsdl->addComplexType('customFieldsArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'customField[]')), 'customField');
//extended data to create/edit a user
$server->wsdl->addComplexType('userData', 'complexType', 'struct', 'all', '', array('userid' => array('name' => 'userid', 'type' => 'xsd:string'), 'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'), 'lastname' => array('name' => 'lastname', 'type' => 'xsd:string'), 'password' => array('name' => 'password', 'type' => 'xsd:string'), 'email' => array('name' => 'email', 'type' => 'xsd:string'), 'signature' => array('name' => 'signature', 'type' => 'xsd:string'), 'lastenter' => array('name' => 'lastenter', 'type' => 'xsd:date'), 'pwd_expire_at' => array('name' => 'pwd_expire_at', 'type' => 'xsd:date'), 'valid' => array('name' => 'valid', 'type' => 'xsd:boolean'), 'custom_fields' => array('name' => '_customfields', 'type' => 'tns:customFieldValuesArray')));
//essential data of a user
$server->wsdl->addComplexType('user', 'complexType', 'struct', 'all', '', array('idst' => array('name' => 'idst', 'type' => 'xsd:int'), 'userid' => array('name' => 'userid', 'type' => 'xsd:string'), 'firstname' => array('name' => 'firstname', 'type' => 'xsd:string'), 'lastname' => array('name' => 'lastname', 'type' => 'xsd:string')));
//list of users
$server->wsdl->addComplexType('usersArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'user[]')), 'user');
//learning object id and title
$server->wsdl->addComplexType('object', 'complexType', 'struct', 'all', '', array('id' => array('name' => 'id', 'type' => 'xsd:int'), 'title' => array('name' => 'title', 'type' => 'xsd:string'), 'description' => array('name' => 'description', 'type' => 'xsd:string')));
//array of learning objects
$server->wsdl->addComplexType('objectsArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'object[]')), 'object');
//----------------------------------------------------------------------------
// register functions
$server->register('authenticate', array('username' => 'xsd:string', 'password' => 'xsd:string', 'third_party' => 'xsd:string'), array('success' => 'xsd:boolean', 'message' => 'xsd:string', 'token' => 'xsd:string', 'expire_at' => 'xsd:string'), $namespace, $namespace . '#authenticate', 'rpc', 'encoded', '...');
$server->register('getAuthMethod', array(), array('success' => 'xsd:boolean', 'method' => 'xsd:string'), $namespace, $namespace . '#getAuthMethod', 'rpc', 'encoded', '...');
$server->register('createUser', array('auth_code' => 'xsd:string', 'user_data' => 'userData'), array('success' => 'xsd:boolean'), $namespace, $namespace . '#createUser', 'rpc', 'encoded', '...');
$server->register('updateUser', array('auth_code' => 'xsd:string', 'idst' => 'xsd:int', 'user_data' => 'userData'), array('success' => 'xsd:boolean'), $namespace, $namespace . '#updateUser', 'rpc', 'encoded', '...');
$server->register('usersList', array('auth_code' => 'xsd:string'), array('success' => 'xsd:boolean', 'list' => 'usersArray'), $namespace, $namespace . '#usersList', 'rpc', 'encoded', '...');
$server->register('userDetails', array('auth_code' => 'xsd:string', 'idst' => 'xsd:int'), array('success' => 'xsd:boolean', 'details' => 'userData'), $namespace, $namespace . '#userDetails', 'rpc', 'encoded', '...');
$server->register('deleteUser', array('auth_code' => 'xsd:string', 'idst' => 'xsd:int'), array('success' => 'xsd:boolean', 'message' => 'xsd:string'), $namespace, $namespace . '#deleteUser', 'rpc', 'encoded', '...');
//----------------------------------------------------------------------------
$server->register('searchObjects', array('auth_code' => 'xsd:string', 'type' => 'xsd:string', 'key' => 'xsd:string'), array('success' => 'xsd:boolean', 'objects' => 'objectsArray'), $namespace, $namespace . '#searchObjects', 'rpc', 'encoded', '...');
$server->register('requestObject', array('auth_code' => 'xsd:string', 'id_object' => 'xsd:int', 'type' => 'xsd:string', 'id_user' => 'xsd:int'), array('success' => 'xsd:boolean', 'object' => 'xsd:string'), $namespace, $namespace . '#requestObject', 'rpc', 'encoded', '...');
return $server;
}
示例10: 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);
示例11: array
<?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');
示例12: dirname
# --------------------------------------------------------
# $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
###
### StringArray
$l_oServer->wsdl->addComplexType('StringArray', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'xsd:string[]')), 'xsd:string');
### ObjectRef
$l_oServer->wsdl->addComplexType('ObjectRef', 'complexType', 'struct', 'all', '', array('id' => array('name' => 'id', 'type' => 'xsd:integer', 'minOccurs' => '0'), 'name' => array('name' => 'name', 'type' => 'xsd:string', 'minOccurs' => '0')));
### ObjectRefArray
示例13: funcionEjWS7
<?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
示例14: passVal
<?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);
示例15:
/*******************************************************************************
*******************************************************************************/
if (!defined('CONFIG')) {
require_once "../svcutil.php";
} else {
require_once DIR_SERVICE . 'svcutil.php';
$DONOTWEBSERVICE = true;
}
define("PARK_SERVICE", "Park");
define("AUTH_SERVICE", "Authorization");
define("KINGDOM_SERVICE", "Kingdom");
define("TREASURY_SERVICE", "Treasury");
$namespace = HTTP_SERVICE . PARK_SERVICE . '/' . PARK_SERVICE . 'Service.php?wsdl';
$server = new soap_server();
$server->debug_flag = false;
$server->configureWSDL(PARK_SERVICE . 'Service', $namespace);
$server->wsdl->schemaTargetNamespace = $namespace;
require_once DIR_SERVICE . 'Common.SOAP.php';
require_once PARK_SERVICE . "Service.definitions.php";
require_once PARK_SERVICE . "Service.function.php";
require_once PARK_SERVICE . "Service.registration.php";
require_once DIR_SERVICE . 'Common.definitions.php';
require_once DIR_SERVICE . AUTH_SERVICE . '/' . AUTH_SERVICE . "Service.definitions.php";
require_once DIR_SERVICE . AUTH_SERVICE . '/' . AUTH_SERVICE . "Service.function.php";
require_once DIR_SERVICE . KINGDOM_SERVICE . '/' . KINGDOM_SERVICE . "Service.definitions.php";
require_once DIR_SERVICE . KINGDOM_SERVICE . '/' . KINGDOM_SERVICE . "Service.function.php";
/*
require_once(DIR_SERVICE.TREASURY_SERVICE.'/'.TREASURY_SERVICE."Service.definitions.php");
require_once(DIR_SERVICE.TREASURY_SERVICE.'/'.TREASURY_SERVICE."Service.function.php");
*/
if (!isset($DONOTWEBSERVICE)) {