/**
  * @see lib/WebServices/WebServices_SoapRequestorAbstract::getSoapHeaders()
  */
 protected function getSoapHeaders()
 {
     $auth = array('ApplicationID' => $this->applicationId, 'Token' => $this->token);
     $authvar = new SoapVar($auth, SOAP_ENC_OBJECT, "AuthorizationType", 'http://www.reuters.com/ns/2006/05/01/webservices/rkd/Common_1');
     $authorization = new SoapHeader('http://www.reuters.com/ns/2006/05/01/webservices/rkd/Common_1', 'Authorization', $authvar);
     $retval = parent::getSoapHeaders();
     $retval[] = $authorization;
     return $retval;
 }
Exemplo n.º 2
0
 /**
  * @see lib/WebServices/WebServices_SoapRequestorAbsract::validate()
  */
 protected function validate()
 {
     if (empty($this->username)) {
         return 'The username is not specified.';
     }
     if (empty($this->applicationId)) {
         return 'The application ID is not specified.';
     }
     if (empty($this->password)) {
         return 'The password is not specified.';
     }
     return parent::validate();
 }