webservices = $config->webservices->toArray(); if ( !empty($login) && !empty($password) ){ $this->login = $login; $this->password = $password; } else { $auth = Zend_Auth::getInstance(); $this->login = $auth->getIdentity()->username; $this->password = md5($this->login.'|'.$auth->getIdentity()->password); } } public function getInfosLogin($login, $ipUtilisateur = '') { $params = new stdClass(); $params->login = $login; $params->ipUtilisateur = $ipUtilisateur; try { $client = $this->loadClient('interne'); $reponse = $client->getInfosLogin($params); return $reponse->getInfosLoginResult; } catch (SoapFault $fault) { //Placer exception pour affichage message return false; } } protected function loadClient($webservice) { $wsdl = $this->webservices[$webservice]['wsdl']; $options = $this->webservices[$webservice]['options']; $options['login'] = $this->login; $options['password'] = $this->password; if (APPLICATION_ENV != 'production'){ $options['cache_wsdl'] = WSDL_CACHE_NONE; } $options['encoding'] = 'utf-8'; $client = new SoapClient($wsdl, $options); return $client; } }