Example #1
0
 public function verificarUsuario($usuario)
 {
     $cliente = new \SoapClient('http://ws.espol.edu.ec/saac/wsandroid.asmx?wsdl');
     $resultado = $cliente->wsInfoUsuario(array("usuario" => $usuario));
     $xml = new \SimpleXMLElement($resultado->wsInfoUsuarioResult->any);
     $datos = (array) $xml->NewDataSet->INFORMACIONUSUARIO;
     if (isset($datos)) {
         $this->setNombres($datos['NOMBRES']);
         $this->setApellidos($datos['APELLIDOS']);
         $this->setSexo($datos['SEXO']);
         $this->setCorreo($usuario . "@espol.edu.ec");
         return 1;
     } else {
         return 0;
     }
 }