-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwsdl.php
More file actions
36 lines (30 loc) · 919 Bytes
/
wsdl.php
File metadata and controls
36 lines (30 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* @file
* Gets the WSDL file.
*/
header('Content-Type: text/xml; charset=utf-8');
// Only create a new WSDL file if the OpenList.php file has changed, since
// the last WSDL file was created.
//
// NOTICE FALSE!
if (FALSE && filemtime(OPENLIST_CLASSES_PATH . '/OpenList.php') < filemtime(WSDL_LOCAL_PATH)) {
echo file_get_contents(WSDL_LOCAL_PATH);
}
else {
try {
require_once 'Zend/Soap/AutoDiscover.php';
require_once OPENLIST_CLASSES_PATH . '/OpenList.php';
$autodiscover = new Zend_Soap_AutoDiscover();
$protocol = 'http';
if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$protocol = 'https';
}
$autodiscover->setClass('OpenList');
$autodiscover->setUri($protocol . '://' . $_SERVER['HTTP_HOST']);
$autodiscover->dump(WSDL_LOCAL_PATH);
$autodiscover->handle();
}
catch(Exception $e) {
}
}