1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
require_once ('pre.php'); |
4
|
|
|
require_once ('nusoap.php'); |
5
|
|
|
require_once('utils_soap.php'); |
6
|
|
|
|
7
|
|
|
define ('permission_denied_fault', '3016'); |
|
|
|
|
8
|
|
|
|
9
|
|
|
define('NUSOAP', 1); |
10
|
|
|
|
11
|
|
|
// Check if we the server is in secure mode or not. |
12
|
|
|
if ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') || $GLOBALS['sys_force_ssl'] == 1) { |
13
|
|
|
$protocol = "https"; |
14
|
|
|
} else { |
15
|
|
|
$protocol = "http"; |
16
|
|
|
} |
17
|
|
|
|
18
|
|
|
$uri = $protocol.'://'.$sys_default_domain; |
19
|
|
|
|
20
|
|
|
// Instantiate server object |
21
|
|
|
$server = new soap_server(); |
22
|
|
|
|
23
|
|
|
//configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http'); |
24
|
|
|
$server->configureWSDL('CodendiAPI',$uri,false,'rpc','http://schemas.xmlsoap.org/soap/http',$uri); |
25
|
|
|
|
26
|
|
|
//include the common TYPES API |
27
|
|
|
require_once('./common/types.php'); |
28
|
|
|
|
29
|
|
|
//include the common SESSION API |
30
|
|
|
require_once('./common/session.php'); |
31
|
|
|
|
32
|
|
|
// include the common GROUP API |
33
|
|
|
require_once('./common/group.php'); |
34
|
|
|
|
35
|
|
|
// include the common USERS API |
36
|
|
|
require_once('common/users.php'); |
37
|
|
|
|
38
|
|
|
// include the TRACKER API |
39
|
|
|
require_once('./tracker/tracker.php'); |
40
|
|
|
|
41
|
|
|
// include the FRS API |
42
|
|
|
require_once('./frs/frs.php'); |
43
|
|
|
|
44
|
|
|
// include the <Plugin> API (only if plugin is available), not tracker v5 |
45
|
|
|
$em =& EventManager::instance(); |
46
|
|
|
$em->processEvent('soap', array()); |
47
|
|
|
|
48
|
|
|
// Call the service method to initiate the transaction and send the response |
49
|
|
|
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''; |
50
|
|
|
$server->service($HTTP_RAW_POST_DATA); |
51
|
|
|
|
52
|
|
|
?> |