48 $this->use_wsdl =
true;
49 $timeout = $ilSetting->get(
'soap_connect_timeout', self::DEFAULT_CONNECT_TIMEOUT);
51 $timeout = self::DEFAULT_CONNECT_TIMEOUT;
53 $this->connect_timeout = $timeout;
55 $this->response_timeout = self::DEFAULT_RESPONSE_TIMEOUT;
73 $this->connect_timeout = $a_timeout;
90 $this->response_timeout = (int) $a_timeout;
107 $this->use_wsdl = $a_stat;
116 return $this->use_wsdl;
128 if (strlen(trim($ilSetting->get(
'soap_wsdl_path',
'')))) {
129 $this->uri = $ilSetting->get(
'soap_wsdl_path',
'');
135 $this->log->debug(
'Using wsdl: ' . $this->
getServer());
136 $this->log->debug(
'Using connection timeout: ' . $this->
getTimeout());
140 $this->client =
new SoapClient(
143 'exceptions' =>
true,
145 'connection_timeout' => (
int) $this->
getTimeout()
149 }
catch (SoapFault $ex) {
150 $this->log->warning(
'Soap init failed with message: ' . $ex->getMessage());
164 $this->stored_socket_timeout = ini_get(
'default_socket_timeout');
165 $this->log->debug(
'Default socket timeout is: ' . $this->stored_socket_timeout);
168 $this->log->debug(
'WSDL mode, using socket timeout: ' . $this->
getTimeout());
169 ini_set(
'default_socket_timeout', $this->
getTimeout());
171 $this->log->debug(
'Non WSDL mode, using socket timeout: ' . $this->
getResponseTimeout());
183 ini_set(
'default_socket_timeout', $this->stored_socket_timeout);
184 $this->log->debug(
'Restoring default socket timeout to: ' . $this->stored_socket_timeout);
193 public function call($a_operation, $a_params)
195 $this->log->debug(
'Calling webservice: ' . $a_operation);
199 return $this->client->__call($a_operation, $a_params);
200 }
catch (SoapFault $exception) {
201 $this->log->error(
'Calling webservice failed with message: ' . $exception->getMessage());
202 $this->log->debug($this->client->__getLastResponseHeaders());
203 $this->log->debug($this->client->__getLastResponse());
206 $this->log->error(
'Caught unknown exception with message: ' . $exception->getMessage());
207 $this->log->debug($this->client->__getLastResponseHeaders());
208 $this->log->debug($this->client->__getLastResponse());
call($a_operation, $a_params)
Call webservice method.
enableWSDL($a_stat)
enable wsdl mode
resetSocketTimeout()
Reset socket default timeout to defaults.
const DEFAULT_RESPONSE_TIMEOUT
setSocketTimeout($a_wsdl_mode)
Set socket timeout.
const DEFAULT_CONNECT_TIMEOUT
enabledWSDL()
Check if wsdl is enabled.
setTimeout($a_timeout)
Set connect timeout.
setResponseTimeout($a_timeout)
Create styles array
The data for the language used.
static getLogger($a_component_id)
Get component logger.
getServer()
Get server uri.
getTimeout()
Get connect timeout.