From 485dc52ff467e6950c6b11c564604544df7ee553 Mon Sep 17 00:00:00 2001 From: Karl Burkhart Date: Thu, 11 Aug 2011 11:54:19 +0000 Subject: [PATCH] --- soap/projekttask.soap.php | 85 +++++++++++++++++++++++++++++++++++++++ soap/projekttask.wsdl.php | 57 ++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 soap/projekttask.soap.php create mode 100644 soap/projekttask.wsdl.php diff --git a/soap/projekttask.soap.php b/soap/projekttask.soap.php new file mode 100644 index 000000000..602061411 --- /dev/null +++ b/soap/projekttask.soap.php @@ -0,0 +1,85 @@ +, + * Andreas Oesterreicher and + * Karl Burkhart . + */ +header("Cache-Control: no-cache"); +header("Cache-Control: post-check=0, pre-check=0",false); +header("Expires Mon, 26 Jul 1997 05:00:00 GMT"); +header("Pragma: no-cache"); + +require_once('../config/vilesci.config.inc.php'); +require_once('../include/basis_db.class.php'); +require_once('../include/projekttask.class.php'); +require_once('../include/datum.class.php'); + +$SOAPServer = new SoapServer(APP_ROOT."/soap/projekttask.wsdl.php"); +$SOAPServer->addFunction("saveProjekttask"); +$SOAPServer->handle(); + +// WSDL Chache auf aus +ini_set("soap.wsdl_cache_enabled", "0"); + +/** + * + * Speichert die vom Webservice übergebenen Parameter in die DB + * @param string $projekttask_id + * @param string $projektphase_id + * @param string $bezeichnung + * @param string $beschreibung + * @param string $aufwand + * @param string $mantis_id + * @param date $insertamum + * @param string $insertvon + * @param date $updateamum + * @param string $updatevon + */ +function saveProjekttask($projekttask_id, $projektphase_id, $bezeichnung, $beschreibung, $aufwand, $mantis_id, $insertamum, $insertvon, $updateamum, $updatevon) +{ + + $projekttask = new projekttask(); + // wenn projekttaskt_id == leer -> neuer task anlegen ohne laden + if($projekttask_id != '') + { + if($task->load($projekttask_id)== false) + $projekttask->new = true; + else + $projekttast->new = false; + } + + $projekttask = new projekttask(); + $projekttask->projekttask_id=$projekttask_id; + $projekttask->projektphase_id=$projektphase_id; + $projekttask->bezeichnung=$bezeichnung; + $projekttask->beschreibung = $beschreibung; + $projekttask->aufwand = $aufwand; + $projekttask->mantis_id = $mantis_id; + $projekttask->insertamum = $insertamum; + $projekttask->insertvon = $insertvon; + $projekttask->updateamum = $updateamum; + $projekttask->updatevon = $updatevon; + + if($projekttask->save($new = true)) + return "OK"; + else + return new SoapFault("Server", $projekttask->errormsg); +} +?> + + diff --git a/soap/projekttask.wsdl.php b/soap/projekttask.wsdl.php new file mode 100644 index 000000000..73c935d98 --- /dev/null +++ b/soap/projekttask.wsdl.php @@ -0,0 +1,57 @@ +"; +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + " /> + + + + + + + + + + + + "/> + + +