/**
  * The contructor method forthis class.
  * @param array $aParams The params have to contain the key 
  * 'soap-service-url', with a valid URL to the webservice. They can 
  * contain a key 'soap-connection-options' for the SoapClient constructor 
  * and a key 'resources' with al list of files to upload.
  * @throws UnexpectedValueException If 'soap-service-url' is not set or the Webservice is not available.
  */
 public function __construct(&$aParams)
 {
     $this->aParams = $aParams;
     $this->aFiles = $aParams['resources'];
     if (empty($this->aParams['soap-service-url'])) {
         throw new UnexpectedValueException('soap-service-url-not-set');
     }
     if (!BsConnectionHelper::urlExists($this->aParams['soap-service-url'])) {
         throw new UnexpectedValueException('soap-service-url-not-valid');
     }
     //If a slash is last char, remove it.
     if (substr($this->aParams['soap-service-url'], -1) == '/') {
         $this->aParams['soap-service-url'] = substr($this->aParams['soap-service-url'], 0, -1);
     }
 }