ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
server.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
13 chdir("../..");
14 define ("ILIAS_MODULE", "webservice/soap");
15 define ("IL_SOAPMODE_NUSOAP", 0);
16 define ("IL_SOAPMODE_INTERNAL", 1);
17 
18 // php7 only SOAPMODE_INTERNAL
19 define('IL_SOAPMODE', IL_SOAPMODE_INTERNAL);
20 
21 include_once "Services/Context/classes/class.ilContext.php";
23 
24 require_once("./Services/Init/classes/class.ilIniFile.php");
25 $ilIliasIniFile = new ilIniFile("./ilias.ini.php");
26 $ilIliasIniFile->read();
27 
28 if ((bool)$ilIliasIniFile->readVariable('https', 'auto_https_detect_enabled'))
29 {
30  $headerName = $ilIliasIniFile->readVariable('https', 'auto_https_detect_header_name');
31  $headerValue = $ilIliasIniFile->readVariable('https', 'auto_https_detect_header_value');
32 
33  $headerName = "HTTP_".str_replace("-","_", strtoupper($headerName));
34  if (strcasecmp($_SERVER[$headerName], $headerValue) == 0)
35  {
36  $_SERVER['HTTPS'] = 'on';
37  }
38 }
39 
40 if(IL_SOAPMODE == IL_SOAPMODE_INTERNAL && strcasecmp($_SERVER["REQUEST_METHOD"], "post") == 0 )
41 {
42  // called by webservice
43  //ini_set("soap.wsdl_cache_enabled", "1");
44  include_once('webservice/soap/include/inc.soap_functions.php');
45  $soapServer = new SoapServer(ilSoapFunctions::buildHTTPPath()."/webservice/soap/nusoapserver.php?wsdl");
46  $soapServer->setClass("ilSoapFunctions");
47  $soapServer->handle();
48 }
49 else
50 {
51  include ('webservice/soap/nusoapserver.php');
52 }
53 ?>
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
static buildHTTPPath()
builds http path if no client is available
$ilIliasIniFile
Definition: server.php:25
const IL_SOAPMODE_INTERNAL
Definition: server.php:16
static init($a_type)
Init context by type.
const CONTEXT_SOAP
INIFile Parser.
const IL_SOAPMODE
Definition: server.php:19