48 $this->use_wsdl =
true;
49 $timeout = $ilSetting->get(
'soap_connect_timeout',self::DEFAULT_CONNECT_TIMEOUT);
52 $timeout = self::DEFAULT_CONNECT_TIMEOUT;
54 $this->connect_timeout = $timeout;
56 $this->response_timeout = self::DEFAULT_RESPONSE_TIMEOUT;
74 $this->connect_timeout = $a_timeout;
92 $this->response_timeout = $a_timeout;
109 $this->use_wsdl = $a_stat;
118 return $this->use_wsdl;
131 if(strlen(trim($ilSetting->get(
'soap_wsdl_path',
''))))
133 $this->uri = $ilSetting->get(
'soap_wsdl_path',
'');
142 $this->log->debug(
'Using wsdl: ' . $this->
getServer());
143 $this->log->debug(
'Using connection timeout: ' . $this->
getTimeout());
147 $this->client =
new SoapClient(
150 'exceptions' =>
true,
152 'connection_timeout' => (
int) $this->
getTimeout()
157 catch (SoapFault $ex) {
159 $this->log->warning(
'Soap init failed with message: ' . $ex->getMessage());
174 $this->stored_socket_timeout = ini_get(
'default_socket_timeout');
175 $this->log->debug(
'Default socket timeout is: ' . $this->stored_socket_timeout);
179 $this->log->debug(
'WSDL mode, using socket timeout: ' . $this->
getTimeout());
180 ini_set(
'default_socket_timeout', $this->
getTimeout());
184 $this->log->debug(
'Non WSDL mode, using socket timeout: ' . $this->
getResponseTimeout());
196 ini_set(
'default_socket_timeout', $this->stored_socket_timeout);
197 $this->log->debug(
'Restoring default socket timeout to: ' . $this->stored_socket_timeout);
206 public function call($a_operation, $a_params)
208 $this->log->debug(
'Calling webseervice: ' . $a_operations);
212 return $this->client->__call($a_operation, $a_params);
214 catch(SoapFault $exception) {
215 $this->log->error(
'Calling webservice failed with message: ' . $exception->getMessage());
216 $this->log->debug($this->client->__getLastResponseHeaders());
217 $this->log->debug($this->client->__getLastResponse());
222 $this->log->error(
'Caught unknown exception with message: '. $exception->getMessage());
223 $this->log->debug($this->client->__getLastResponseHeaders());
224 $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.
getResponseTimeout()
Get response timeout.
const DEFAULT_CONNECT_TIMEOUT
enabledWSDL()
Check if wsdl is enabled.
setTimeout($a_timeout)
Set connect timeout.
setResponseTimeout($a_timeout)
Set response 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.