コード例 #1
0
ファイル: Request.php プロジェクト: ronaldkonjer/wp-tripolis
 /**
  * Creates a SOAP client and initializes the headers etc
  *
  * @return \SoapClient|SoapClient
  */
 protected function getSoapClient()
 {
     if ($this->soap === null) {
         // Refactor to somewhere
         $options = array('trace' => 1, 'exceptions' => true, 'cache_wsdl' => WSDL_CACHE_NONE, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS);
         $this->soap = new \SoapClient($this->provider->getBaseURL() . '/' . $this->service->getServiceURI(), $options);
         if ($this->needsAuthentication) {
             $this->soap->__setSoapHeaders(array($this->provider->getAuthentication()->getHeader()));
         }
     }
     return $this->soap;
 }
コード例 #2
0
 public function setServiceName($name)
 {
     parent::setServiceName($name);
     $this->setServiceURI('/api2/soap/' . ucfirst($name) . '?wsdl');
     return $this;
 }
コード例 #3
0
 public function __construct(TripolisProvider $provider)
 {
     parent::__construct($provider);
     $this->setServiceURI('/api2/soap/ContactService?wsdl');
 }