Author: Thomas Rabaix
Author: Michal Korzeniowski (mko_san@lafiel.net)
Inheritance: extends SoapClient
Ejemplo n.º 1
0
 /**
  * Constructor
  * 
  * @param string $wsdl
  * @param array $options
  */
 public function __construct($wsdl, $options)
 {
     // verify that a user name and password were entered
     if (empty($options['user']) || empty($options['password'])) {
         throw new EWS_Exception('A username and password is required.');
     }
     // end if no user name and password were entered
     // set the username and password properties
     $this->user = $options['user'];
     $this->password = $options['password'];
     parent::__construct($wsdl, $options);
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  * 
  * @param string $wsdl
  * @param array $options
  */
 public function __construct($wsdl, $options)
 {
     // verify that a user name and password were entered
     if (empty($options['user']) || empty($options['password'])) {
         throw new EWS_Exception('A username and password is required.');
     }
     // end if no user name and password were entered
     // set the username and password properties
     $this->user = $options['user'];
     $this->password = $options['password'];
     $soapHeader = new SoapHeader('http://schemas.microsoft.com/exchange/services/2006/types', 'RequestServerVersion Version="Exchange2007_SP1"');
     $this->__setSoapHeaders($soapHeader);
     parent::__construct($wsdl, $options);
 }
Ejemplo n.º 3
0
 /**
  * Constructor
  *
  * @param string $wsdl
  * @param array $options
  */
 public function __construct($wsdl, $options)
 {
     // Verify that a user name and password were entered.
     if (empty($options['user']) || empty($options['password'])) {
         throw new EWS_Exception('A username and password is required.');
     }
     // Set the username and password properties.
     $this->user = $options['user'];
     $this->password = $options['password'];
     // If a version was set then add it to the headers.
     if (!empty($options['version'])) {
         $this->__default_headers[] = new SoapHeader('http://schemas.microsoft.com/exchange/services/2006/types', 'RequestServerVersion Version="' . $options['version'] . '"');
     }
     // If impersonation was set then add it to the headers.
     if (!empty($options['impersonation'])) {
         $this->__default_headers[] = new SoapHeader('http://schemas.microsoft.com/exchange/services/2006/types', 'ExchangeImpersonation', $options['impersonation']);
     }
     parent::__construct($wsdl, $options);
 }
Ejemplo n.º 4
0
<?php 
require_once "ntlm/NTLMStream.php";
require_once "ntlm/NTLMSoapClient.php";
//Aici e definit domeniul, userul si parola
stream_wrapper_unregister('http');
stream_wrapper_register('http', 'NTLMStream') or die("Failed to register protocol");
// Initialize Soap Client
$baseURL = 'http://86.35.240.116:7149/Test/WS/Test_UnicSpot%20-%20Productie/Page/';
$client = new NTLMSoapClient($baseURL . 'SiteIntegrationCustomer');
// La linia asta apare eroarea respectiva
// Find the first Company in the Companies
$result = $client->Companies();
$companies = $result->return_value;
echo "Companies:<br>";
if (is_array($companies)) {
    foreach ($companies as $company) {
        echo "{$company}<br>";
    }
    $cur = $companies[0];
} else {
    echo "{$companies}<br>";
    $cur = $companies;
}
stream_wrapper_restore('http');
?>