33 define(
'DEFAULT_TIMEOUT',5);
34 define(
'DEFAULT_RESPONSE_TIMEOUT',30);
36 if (version_compare(PHP_VERSION,
'5.3.0',
'>=') or 1)
38 include_once
'./webservice/soap/lib2/nusoap.php';
42 include_once
'./webservice/soap/lib/nusoap.php';
49 var $response_timeout = null;
52 function ilSoapClient($a_server =
'')
57 $this->__setServer($a_server);
60 function __setServer($a_server)
66 return $this->server = $a_server;
69 if(strlen(trim($ilSetting->get(
'soap_wsdl_path'))))
71 return $this->server = trim($ilSetting->get(
'soap_wsdl_path'));
74 $this->server = ILIAS_HTTP_PATH.
'/webservice/soap/server.php?wsdl';
82 function setTimeout($a_timeout)
84 $this->timeout = $a_timeout;
91 function setResponseTimeout($a_timeout)
93 $this->response_timeout = $a_timeout;
95 function getResponseTimeout()
97 return $this->response_timeout;
100 function enableWSDL($a_status)
102 $this->use_wsdl = (bool) $a_status;
104 function enabledWSDL()
106 return (
bool) $this->use_wsdl;
111 $this->client =
new soap_client($this->getServer(),
112 $this->enabledWSDL(),
118 $this->getResponseTimeout());
120 if(
$error = $this->client->getError())
122 $this->log->write(
'Error calling soap server: '.$this->getServer().
' Error: '.
$error);
128 function &call($a_operation,$a_params)
130 $res = $this->client->call($a_operation,$a_params);
131 if(
$error = $this->client->getError())
133 $this->log->write(
'Error calling soap server: '.$this->getServer().
' Error: '.
$error);