/** * 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; }
public function setServiceName($name) { parent::setServiceName($name); $this->setServiceURI('/api2/soap/' . ucfirst($name) . '?wsdl'); return $this; }
public function __construct(TripolisProvider $provider) { parent::__construct($provider); $this->setServiceURI('/api2/soap/ContactService?wsdl'); }