From 5303a976f8d0e0f766b2a0ecda7d02e775b987af Mon Sep 17 00:00:00 2001 From: oesi Date: Thu, 23 Apr 2015 11:48:24 +0200 Subject: [PATCH] =?UTF-8?q?STIP=20Testclient=20hinzugef=C3=BCgt=20um=20Err?= =?UTF-8?q?or=20Messages=20zu=20simulieren=20Error=20werden=20nur=20per=20?= =?UTF-8?q?Mail=20an=20Admins=20versandt=20wenn=20tatsaechlich=20ein=20Err?= =?UTF-8?q?or=20auftritt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- soap/stip.soap.php | 8 ++- soap/stip_client.php | 3 +- soap/stip_client_error.php | 123 +++++++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+), 3 deletions(-) create mode 100644 soap/stip_client_error.php diff --git a/soap/stip.soap.php b/soap/stip.soap.php index 84f351bd0..8ce88298f 100644 --- a/soap/stip.soap.php +++ b/soap/stip.soap.php @@ -252,8 +252,12 @@ function SendStipendienbezieherStipError($parameters) $log->beschreibung = "Stip Error"; $log->save(true); - $mail = new mail(MAIL_ADMIN, 'vilesci@'.DOMAIN, 'STIP - Error', $xmlData); - $mail->send(); + //1=successful; 2=incomplete xml document; 3=incomplete processing; 4=system-error + if($parameters->errorReport->ErrorStatusCode!=1) + { + $mail = new mail(MAIL_ADMIN, 'vilesci@'.DOMAIN, 'STIP - Error', $xmlData); + $mail->send(); + } } ?> diff --git a/soap/stip_client.php b/soap/stip_client.php index bc09b3e77..7de745e51 100644 --- a/soap/stip_client.php +++ b/soap/stip_client.php @@ -34,7 +34,8 @@ $db = new basis_db();

Testclient für Webservice Stipendienstelle

- Show WSDL + Show WSDL
+ Error Tester

diff --git a/soap/stip_client_error.php b/soap/stip_client_error.php new file mode 100644 index 000000000..4d2052b1d --- /dev/null +++ b/soap/stip_client_error.php @@ -0,0 +1,123 @@ +. + */ +/** + * Testclient um STIP Error Meldungen zu simulieren + */ +require_once('../config/vilesci.config.inc.php'); +require_once('../include/functions.inc.php'); +require_once('../include/basis_db.class.php'); +require_once('stip.class.php'); +$getuid=get_uid(); +if(!check_lektor($getuid)) + die('Sie haben keine Berechtigung für diese Seite.'); +$db = new basis_db(); +?> + + + + + STIP-Client + + +

Testclient für Webservice Stipendienstelle Error

+ Show WSDL +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Username:">
Passwort:
ErhKz:">
StateCode: + +
StateMessage:">
ErrorStatusCode: + +
JobID:">
+ +
+
+ + +SendStipendienbezieherStipError(array("userName"=>$username,"passWord"=>$passwort,"errorReport"=>array("ErhKz"=>$ErhKz, "StateCode"=>$statecode,"StateMessage"=>$statemessage,"ErrorStatusCode"=>$errorstatuscode,"JobID"=>$jobid))); + echo '

Error Request Result sent

'; + } + catch(SoapFault $fault) + { + echo "SOAP Fault: (faultcode: ".$fault->faultcode.", faultstring: ".$fault->faultstring.")", E_USER_ERROR; + } + +} + +?> + +