public static function getListDoctor() { $_url = URL_BASE . WS_PARTICIPANT; $_params = array("empId" => CLIENT_COMPANY, "estado" => ACTIVE); $ws = new mySoap($_url, "TraerMedico", $_params); $_response = $ws->execute(); if (is_array($_response) && count($_response)) { return $_response; } }
public static function getListOfficeByUser($userId) { global $default_status; $_url = URL_BASE . WS_SECURITY; $_params = array('empId' => CLIENT_COMPANY, 'oficinaId' => '0', 'participanteId' => $userId, 'estado' => ACTIVE); $_ws = new mySoap($_url, "ConsultarOficinaPorUsuario", $_params); $_response = $_ws->execute(); if (is_array($_response) && count($_response)) { return $_response; } }
public static function getListDiagnostic() { $_url = URL_BASE . WS_LABORATORY; $_params = array("diagnosticoId" => "0", "codigo" => ""); $ws = new mySoap($_url, "ConsultarDiagnostico", $_params); $_response = $ws->execute(); //print_r($_response); exit; if (is_array($_response) && count($_response)) { return $_response; } }
public function login() { $this->_params = array("participanteId" => $this->getId(), "usuarioId" => "", "apellido" => "", "nombre" => "", "identificacion" => "", "estado" => $this->_status); $ws = new mySoap($this->_url, "ConsultarUsuario", $this->_params); $this->_response = $ws->execute(); if (is_array($this->_response) && count($this->_response)) { $this->_firstname = $this->_response["ConsultarUsuarioResult"]["ClsUsuario"]["Nombre"]; $this->_lastname = $this->_response["ConsultarUsuarioResult"]["ClsUsuario"]["Apellido"]; $this->_identification = $this->_response["ConsultarUsuarioResult"]["ClsUsuario"]["Identificacion"]; $this->_username = $this->_response["ConsultarUsuarioResult"]["ClsUsuario"]["UsuarioId"]; return true; } else { return false; } }
public function save() { $this->_params = array("listConvenio" => array("ClsConvenio" => array('EmpId' => $this->getCompany(), 'OficinaId' => $this->getOffice(), 'ConvenioId' => $this->_id, 'ConvenioDescripcion' => $this->_description, 'ConvenioDescuento' => $this->_discount, 'ConvenioUsuario' => $this->_username, 'ConvenioClave' => $this->_password, 'Estado' => $this->_status, 'UserId' => '1'))); $ws = new mySoap($this->_url . WS_CATALOG, "GrabarActualizarConvenio", $this->_params); $this->_response = $ws->execute(); return $this->_response; }
public function getAccessForm() { $_url_form = ""; $this->_params = array("empId" => $this->_company, "oficinaId" => $this->_office, "usuarioId" => $this->_userId, "formulario" => $this->_form, "estado" => ACTIVE); $_ws = new mySoap($this->_url, "ValidarAcceso", $this->_params); $_response = $_ws->execute(); if (is_array($_response["ValidarAccesoResult"]["ClsAcceso"]) && count($_response["ValidarAccesoResult"]["ClsAcceso"])) { //print_r($_response); $_url_form = $_response["ValidarAccesoResult"]["ClsAcceso"]["FormaUrl"]; } return $_url_form; }
public function viewResult() { $this->_params = array("empId" => $this->_company, "oficinaId" => $this->_office, "ordId" => $this->_orderId, "estado" => $this->_status); $ws = new mySoap($this->_url, "ConsultarOrdenId", $this->_params); $this->_response = $ws->execute(); if (is_array($this->_response) && count($this->_response)) { return $this->_response; } }
public static function login($company, $userId) { $_url = URL_BASE . WS_PARTICIPANT; $_params = array("empId" => $company, "participanteId" => $userId, "usuarioId" => "", "apellido" => "", "nombre" => "", "identificacion" => "", "estado" => ACTIVE); $ws = new mySoap($_url, "ConsultarUsuario", $_params); $_response = $ws->execute(); if (is_array($_response) && count($_response)) { return $_response["ConsultarUsuarioResult"]["ClsUsuario"]; } }
$objWSSE = new WSSESoap($doc); /* add Timestamp with no expiration timestamp */ $objWSSE->addTimestamp(); /* create new XMLSec Key using RSA SHA-1 and type is private key */ $objKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA1, array('type' => 'private')); /* load the private key from file - last arg is bool if key in file (TRUE) or is string (FALSE) */ $objKey->loadKey(PRIVATE_KEY, TRUE); /* Sign the message - also signs appropraite WS-Security items */ $objWSSE->signSoapDoc($objKey); /* Add certificate (BinarySecurityToken) to the message and attach pointer to Signature */ $token = $objWSSE->addBinaryToken(file_get_contents(CERT_FILE)); $objWSSE->attachTokentoSig($token); return parent::__doRequest($objWSSE->saveXML(), $location, $saction, $version); } } class instances { public $instancesSet = NULL; } $wsdl = 'http://s3.amazonaws.com/ec2-downloads/ec2.wsdl'; try { $sClient = new mySoap($wsdl, array('trace' => 1)); /* Force location path - MUST INCLUDE trailing slash BUG in ext/soap that does not automatically add / if URL does not contain path cause POST header to be invalid */ $sClient->location = 'https://ec2.amazonaws.com/'; $objInstances = new instances(); $test = $sClient->DescribeInstances($objInstances); var_dump($test); } catch (SoapFault $e) { var_dump($e); }