Example #1
0
 /**
  * Login into API
  * @throws Exception\Login
  */
 private function _login()
 {
     $headers = array(new \SoapHeader('http://www.w3.org/2005/08/addressing', 'Action', $this->_getMethodUrl('Zaloguj'), 0), new \SoapHeader('http://www.w3.org/2005/08/addressing', 'To', $this->_getServiceUrl(), 0));
     $this->__setSoapHeaders($headers);
     $result = parent::Zaloguj(array('pKluczUzytkownika' => $this->_userKey));
     if (empty($result)) {
         throw new Exception\Login();
     }
     $this->debug("pKluczUzytkownika: " . $this->_userKey);
     //        $this->debug("ZalogujResult: ".print_r($result, true));
     $this->debug("Sesja: " . $result->ZalogujResult);
     $this->storeSession($result->ZalogujResult);
     $this->solveCaptcha();
 }