ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
server.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4
14
chdir(
"../.."
);
15
const
ILIAS_MODULE
=
"webservice/soap"
;
16
const
IL_SOAPMODE_NUSOAP
= 0;
17
const
IL_SOAPMODE_INTERNAL
= 1;
18
19
// php7 only SOAPMODE_INTERNAL
20
const
IL_SOAPMODE
=
IL_SOAPMODE_INTERNAL
;
21
22
require_once
'libs/composer/vendor/autoload.php'
;
23
24
ilContext::init
(
ilContext::CONTEXT_SOAP
);
25
26
$ilIliasIniFile
=
new
ilIniFile
(
"./ilias.ini.php"
);
27
$ilIliasIniFile
->read();
28
29
if
(
$ilIliasIniFile
->readVariable(
'https'
,
'auto_https_detect_enabled'
)) {
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
$_SERVER
[
'HTTPS'
] =
'on'
;
36
}
37
}
38
39
if
(
IL_SOAPMODE
===
IL_SOAPMODE_INTERNAL
&& strcasecmp(
$_SERVER
[
"REQUEST_METHOD"
],
"post"
) === 0) {
40
// This is a SOAP request
41
$uri =
ilSoapFunctions::buildHTTPPath
() .
'/webservice/soap/server.php'
;
42
if
(isset(
$_GET
[
'client_id'
])) {
43
$uri .=
'?client_id='
.
$_GET
[
'client_id'
];
44
$wsdl = $uri .
'&wsdl'
;
45
}
else
{
46
$wsdl = $uri .
'?wsdl'
;
47
}
48
$soapServer =
new
SoapServer($wsdl, array(
'uri'
=> $uri));
49
$soapServer->setObject(
new
ilSoapFunctions
());
50
$soapServer->handle();
51
}
else
{
52
// This is a request to display the available SOAP methods or WSDL...
53
include(
'webservice/soap/nusoapserver.php'
);
54
}
IL_SOAPMODE_NUSOAP
const IL_SOAPMODE_NUSOAP
Definition:
server.php:16
$_GET
$_GET["client_id"]
Definition:
webdav.php:30
ilSoapFunctions
Definition:
inc.soap_functions.php:39
ilSoapFunctions\buildHTTPPath
static buildHTTPPath()
Definition:
inc.soap_functions.php:849
$ilIliasIniFile
$ilIliasIniFile
Definition:
server.php:26
$_SERVER
$_SERVER['HTTP_HOST']
Definition:
raiseError.php:10
IL_SOAPMODE_INTERNAL
const IL_SOAPMODE_INTERNAL
Definition:
server.php:17
ilContext\init
static init(string $a_type)
Init context by type.
Definition:
class.ilContext.php:52
ILIAS_MODULE
const ILIAS_MODULE
Definition:
server.php:15
ilContext\CONTEXT_SOAP
const CONTEXT_SOAP
Definition:
class.ilContext.php:34
ilIniFile
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilIniFile.php:47
IL_SOAPMODE
const IL_SOAPMODE
Definition:
server.php:20
webservice
soap
server.php
Generated on Wed Sep 10 2025 14:12:03 for ILIAS by
1.8.13 (using
Doxyfile
)