function loadSOAPClient() { try { // we unregister the current HTTP wrapper stream_wrapper_unregister('http'); // we register the new HTTP wrapper //$client = new PMServiceProviderNTLMStream($this->auth); PMServiceProviderNTLMStream::setAuthStream($this->auth); stream_wrapper_register('http', 'PMServiceProviderNTLMStream') or die("Failed to register protocol"); // $this->client = new PMServiceNTLMSoapClient($this->wsdlurl, array('trace' => 1, 'auth' => $this->auth));// Hugo's code $this->client = new PMServiceNTLMSoapClient($this->wsdlurl, array('trace' => 1)); // Ankit's Code $this->client->setAuthClient($this->auth); return true; } catch (Exception $e) { echo $e; exit; } }
static function setAuthStream($auth) { $authInfo = explode(":", $auth); self::$user = $authInfo[0]; self::$password = $authInfo[1]; }