makeProxy.php
1.02 KB
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
37
38
39
40
41
42
43
44
45
<?php
/*
* Executable to make 'base.xml' proxies for Remote Centers (DD Server)
*/
if (!function_exists('__autoload')) {
function __autoload($class_name) {
require_once $class_name . '.php';
}
}
putenv("LD_LIBRARY_PATH=".getenv("LD_LIBRARY_PATH"));
putenv("PATH=./:".getenv("DDBASEBIN").":/bin:/usr/bin");
set_include_path("./:".getenv("DATAMANAGER").":".getenv("REMOTEDATA").":".getenv("CALLEXT"));
// if (! file_exists(DATAPATH."/RemoteData/Bases.xml"))
// exit('No Bases.xml file'.PHP_EOL);
//
// $basesDom->load(DATAPATH."/RemoteData/Bases.xml");
//
// $bases = $basesDom->getElementsByTagName("dataCenter");
$bases = array("CDAWEB");
$useSpase = true;
foreach ($bases as $base)
{
// $class = $base->getAttribute('xml:id');
echo PHP_EOL.$base.PHP_EOL;
$center = new $base();
// if ($center->monitor())
// {
$center->initProxy();
$center->makeProxy();
$center->saveProxy();
// }
// else
// {
// print_r("Attention : $class service is down");
// }
}
?>