ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSoapClient Class Reference
+ Collaboration diagram for ilSoapClient:

Public Member Functions

 ilSoapClient ($a_server= '')
 __setServer ($a_server)
 getServer ()
 setTimeout ($a_timeout)
 getTimeout ()
 setResponseTimeout ($a_timeout)
 getResponseTimeout ()
 enableWSDL ($a_status)
 enabledWSDL ()
 init ()
call ($a_operation, $a_params)

Data Fields

const DEFAULT_CONNECT_TIMEOUT = 10
const DEFAULT_RESPONSE_TIMEOUT = 5
 $server = ''
 $timeout = null
 $response_timeout = null
 $use_wsdl = true

Detailed Description

Definition at line 40 of file class.ilSoapClient.php.

Member Function Documentation

ilSoapClient::__setServer (   $a_server)

Definition at line 58 of file class.ilSoapClient.php.

References $ilSetting, ilUtil\_getHttpPath(), and setTimeout().

Referenced by ilSoapClient().

{
global $ilSetting;
if(strlen($a_server))
{
return $this->server = $a_server;
}
if(strlen(trim($ilSetting->get('soap_wsdl_path'))))
{
return $this->server = trim($ilSetting->get('soap_wsdl_path'));
}
$this->setTimeout($ilSetting->get('soap_connect_timeout', self::DEFAULT_CONNECT_TIMEOUT));
$this->server = ilUtil::_getHttpPath().'/webservice/soap/server.php?wsdl';
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilSoapClient::call (   $a_operation,
  $a_params 
)

Definition at line 131 of file class.ilSoapClient.php.

References $res, and getServer().

{
$res = $this->client->call($a_operation,$a_params);
#$GLOBALS['ilLog']->write(__METHOD__.': '.$this->client->request);
#$GLOBALS['ilLog']->write(__METHOD__.': '.$this->client->response);
if($error = $this->client->getError())
{
if(stristr($error, 'socket read of headers') === FALSE)
{
$this->log->write('Error calling soap server: '.$this->getServer().' Error: '.$error);
}
}
return $res;
// Todo cannot check errors here since it's not possible to distinguish between 'timeout' and other errors.
}

+ Here is the call graph for this function:

ilSoapClient::enabledWSDL ( )

Definition at line 104 of file class.ilSoapClient.php.

References $use_wsdl.

Referenced by init().

{
return (bool) $this->use_wsdl;
}

+ Here is the caller graph for this function:

ilSoapClient::enableWSDL (   $a_status)

Definition at line 100 of file class.ilSoapClient.php.

{
$this->use_wsdl = (bool) $a_status;
}
ilSoapClient::getResponseTimeout ( )

Definition at line 95 of file class.ilSoapClient.php.

References $response_timeout.

Referenced by init().

+ Here is the caller graph for this function:

ilSoapClient::getServer ( )

Definition at line 77 of file class.ilSoapClient.php.

References $server.

Referenced by call(), and init().

{
return $this->server;
}

+ Here is the caller graph for this function:

ilSoapClient::getTimeout ( )

Definition at line 86 of file class.ilSoapClient.php.

References DEFAULT_CONNECT_TIMEOUT.

Referenced by init().

{
return $this->timeout ? $this->timeout : self::DEFAULT_CONNECT_TIMEOUT;
}

+ Here is the caller graph for this function:

ilSoapClient::ilSoapClient (   $a_server = '')

Definition at line 50 of file class.ilSoapClient.php.

References $ilLog, and __setServer().

{
global $ilLog;
$this->log =& $ilLog;
$this->__setServer($a_server);
}

+ Here is the call graph for this function:

ilSoapClient::init ( )

Definition at line 109 of file class.ilSoapClient.php.

References enabledWSDL(), getResponseTimeout(), getServer(), and getTimeout().

{
$this->client = new nusoap_client($this->getServer(),
$this->enabledWSDL(),
false, // no proxy support in the moment
false,
false,
false,
$this->getTimeout(),
$this->getResponseTimeout());
if($error = $this->client->getError())
{
if(stristr($error, 'socket read of headers') === FALSE)
{
$this->log->write('Error calling soap server: '.$this->getServer().' Error: '.$error);
}
return false;
}
return true;
}

+ Here is the call graph for this function:

ilSoapClient::setResponseTimeout (   $a_timeout)

Definition at line 91 of file class.ilSoapClient.php.

{
$this->response_timeout = $a_timeout;
}
ilSoapClient::setTimeout (   $a_timeout)

Definition at line 82 of file class.ilSoapClient.php.

Referenced by __setServer().

{
$this->timeout = $a_timeout;
}

+ Here is the caller graph for this function:

Field Documentation

ilSoapClient::$response_timeout = null

Definition at line 47 of file class.ilSoapClient.php.

Referenced by getResponseTimeout().

ilSoapClient::$server = ''

Definition at line 45 of file class.ilSoapClient.php.

Referenced by getServer().

ilSoapClient::$timeout = null

Definition at line 46 of file class.ilSoapClient.php.

ilSoapClient::$use_wsdl = true

Definition at line 48 of file class.ilSoapClient.php.

Referenced by enabledWSDL().

const ilSoapClient::DEFAULT_CONNECT_TIMEOUT = 10

Definition at line 42 of file class.ilSoapClient.php.

Referenced by getTimeout(), and ilObjSystemFolderGUI\initWebServicesForm().

const ilSoapClient::DEFAULT_RESPONSE_TIMEOUT = 5

Definition at line 43 of file class.ilSoapClient.php.


The documentation for this class was generated from the following file: