$no_gz_buffer=true;
// 0. Include GForge files for access to GForge system
-require_once('www/include/squal_pre.php');
-require_once('www/include/BaseLanguage.class');
+require_once '../env.inc.php';
+require_once $gfwww.'include/squal_pre.php';
+require_once $gfcommon.'include/gettext.php';
+require_once $gfcommon.'include/FusionForge.class.php';
+
+ini_set('memory_limit','32M');
$uri = 'http://'.$sys_default_domain;
// 1. include client and server
-require_once('./nusoap.php');
+require_once $gfwww.'soap/nusoap.php';
//$debug = true;
// 2. instantiate server object
$server = new soap_server();
//configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http');
//$server->configureWSDL('GForgeAPI',$uri);
-$server->configureWSDL('GForgeAPI',$uri,false,'rpc','http://schemas.xmlsoap.org/soap/http',$uri);
+$server->configureWSDL('FusionForgeAPI',$uri,false,'rpc','http://schemas.xmlsoap.org/soap/http',$uri);
// add types
$server->wsdl->addComplexType(
$uri,
$uri.'#logout');
+$server->register(
+ 'version',
+ array(),
+ array('versionResponse'=>'xsd:string'),
+ $uri,
+ $uri.'#version');
//
// Include Group Functions
//
-require_once('www/soap/common/group.php');
+require_once $gfwww.'soap/common/group.php';
//
// Include User Functions
//
-require_once('www/soap/common/user.php');
+require_once $gfwww.'soap/common/user.php';
//
// Include tracker & tracker query Functions
//
-require_once('www/soap/tracker/tracker.php');
-require_once('www/soap/tracker/query.php');
+require_once $gfwww.'soap/tracker/tracker.php';
+require_once $gfwww.'soap/tracker/query.php';
//
// Include Docman Functions
//
-require_once('www/soap/docman/docman.php');
+require_once $gfwww.'soap/docman/docman.php';
//
-// Include task manager Functions
+// Include tasks Functions
//
-require_once('www/soap/pm/pm.php');
+require_once $gfwww.'soap/pm/pm.php';
+require_once $gfwww.'soap/reporting/timeentry.php';
//
// Include frs Functions
//
-require_once('www/soap/frs/frs.php');
+require_once $gfwww.'soap/frs/frs.php';
//
// Include SCM Functions
//
-require_once('www/soap/scm/scm.php');
+require_once $gfwww.'soap/scm/scm.php';
$wsdl_data = $server->wsdl->serialize();
+/*
if ($wsdl == "save") {
$fp = fopen ("/tmp/SoapAPI1.wsdl", 'w');
fputs ($fp, $wsdl_data);
fclose ($fp);
}
+*/
-if ($wsdl) {
+if (isset($wsdl)) {
echo $wsdl_data;
return;
}
* @return string the session key
*/
function login($userid, $passwd) {
- global $feedback, $Language, $session_ser;
+ global $feedback, $session_ser;
- $Language=new BaseLanguage();
- $Language->loadLanguage("English"); // TODO use the user's default language
- setlocale (LC_TIME, $Language->getText('system','locale'));
- $sys_strftimefmt = $Language->getText('system','strftimefmt');
- $sys_datefmt = $Language->getText('system','datefmt');
+ setlocale (LC_TIME, _('en_US'));
$res = session_login_valid($userid, $passwd);
return "OK";
}
+/**
+ * version - get the running version of FusionForge
+ *
+ * @return string the version of FusionForge running on the server
+ */
+function version() {
+ $ff = new FusionForge();
+ return $ff->software_version;
+}
// 4. call the service method to initiate the transaction and send the response
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';