diff --git a/soap/ressource.soap.php b/soap/ressource.soap.php new file mode 100644 index 000000000..a0b362942 --- /dev/null +++ b/soap/ressource.soap.php @@ -0,0 +1,80 @@ +, + * 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/ressource.class.php'); +require_once('../include/datum.class.php'); + +$SOAPServer = new SoapServer(APP_ROOT."/soap/ressource.wsdl.php?".microtime()); +$SOAPServer->addFunction("saveRessource"); +$SOAPServer->handle(); + +// WSDL Chache auf aus +ini_set("soap.wsdl_cache_enabled", "0"); + +/** + * + * Speichert die Ressource + * @param unknown_type $ressource_id + * @param unknown_type $bezeichnung + * @param unknown_type $beschreibung + * @param unknown_type $mitarbeiter_uid + * @param unknown_type $student_uid + * @param unknown_type $betriebsmittel_id + * @param unknown_type $firma_id + * @param unknown_type $user + */ +function saveRessource($ressource_id, $bezeichnung, $beschreibung, $mitarbeiter_uid, $student_uid, $betriebsmittel_id, $firma_id, $user) +{ + $ressource = new ressource(); + if($ressource_id!='') + { + $ressource->load($ressource_id); + $ressource->new = false; + } + else + { + $ressource->new = true; + $ressource->insertvon = $user; + } + $ressource->ressource_id=$ressource_id; + $ressource->bezeichnung=$bezeichnung; + $ressource->beschreibung=$beschreibung; + $ressource->mitarbeiter_uid = $mitarbeiter_uid; + $ressource->student_uid = $student_uid; + $ressource->betriebsmittel_id = $betriebsmittel_id; + $ressource->firma_id = $firma_id; + $ressource->updatevon = $user; + + if($ressource->save()) + return $ressource->ressource_id; + else + return new SoapFault("Server", $ressource->errormsg); +} +?> + + diff --git a/soap/ressource.wsdl.php b/soap/ressource.wsdl.php new file mode 100644 index 000000000..869147fbb --- /dev/null +++ b/soap/ressource.wsdl.php @@ -0,0 +1,55 @@ +"; +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + " /> + + + + + + + + + + + + "/> + + + \ No newline at end of file