diff options
author | pdanner <pdanner@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2007-10-18 15:35:37 +0000 |
---|---|---|
committer | pdanner <pdanner@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2007-10-18 15:35:37 +0000 |
commit | d19cd318b86feacd77dde2ff344b68f4439461a9 (patch) | |
tree | f033aa0ace6df267b6c081847396b077eacfd374 /id | |
parent | cc811566edc1c61a5e5036d8d4e39de073e4cbcf (diff) | |
download | moa-id-spss-d19cd318b86feacd77dde2ff344b68f4439461a9.tar.gz moa-id-spss-d19cd318b86feacd77dde2ff344b68f4439461a9.tar.bz2 moa-id-spss-d19cd318b86feacd77dde2ff344b68f4439461a9.zip |
Show also SZR-gateway communication error 4000 on parep validation
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1022 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java index acd193a68..1ed9d89ea 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java @@ -349,6 +349,7 @@ public class ParepValidator implements InfoboxValidator { if (connectionParameters.getUrl().toLowerCase().startsWith("https:")) client.setSSLSocketFactory(SSLUtils.getSSLSocketFactory(AuthConfigurationProvider.getInstance(), connectionParameters));
response = client.createMandateResponse(requ);
}
+ Logger.debug("SZR-Gateway Response Code: " + response.getResultCode()+ " " + response.getInfo());
if (response.getResultCode()==2000) {
if(response.getMandate()==null) {
Logger.error("Keine Vollmacht vom SZR-Gateway erhalten");
@@ -379,18 +380,22 @@ public class ParepValidator implements InfoboxValidator { } else {
String errorMsg = "Fehler " + response.getResultCode() + " bei Stammzahlenregister-Gateway Anfrage";
String responseInfo = response.getInfo();
- if (response.getResultCode()>4000 && response.getResultCode()<4999) {
+ if (response.getResultCode()>=4000 && response.getResultCode()<4999) {
if (!ParepUtils.isEmpty(responseInfo)) errorMsg = errorMsg + ": " + responseInfo;
validationResult.setErrorMessage(errorMsg);
- } else if (response.getResultCode()>=3000 && response.getResultCode()<=3000) {
+ } else if (response.getResultCode()>=5000 && response.getResultCode()<=5999) {
// Person not found
ParepInputProcessor inputProcessor= getInputProcessor();
- if (response.getResultCode()==3000) { //TODO: verify code
- errorMsg = "Die Person konnte nicht eindeutig identifiziert werden. Bitte ergänzen/ändern Sie ihre Angaben.";
- } else {
- if (!ParepUtils.isEmpty(responseInfo)) errorMsg = errorMsg + ": " + responseInfo;
- }
-
+ switch (response.getResultCode()) {
+ case 5230:
+ errorMsg = "Keine mit den Eingaben übereinstimmende Person vorhanden. Bitte ergänzen/ändern Sie ihre Angaben.";
+ break;
+ case 5231:
+ errorMsg = "Die Person konnte nicht eindeutig identifiziert werden. Es existieren mehrere Personen zu Ihrer Suchanfrage. Bitte ergänzen/ändern Sie ihre Angaben.";
+ break;
+ default:
+ if (!ParepUtils.isEmpty(responseInfo)) errorMsg = errorMsg + ": " + responseInfo;
+ }
this.form = inputProcessor.validate(generateParameters(), errorMsg);
if (this.form == null) {
validationResult.setErrorMessage(ParepValidator.COMMON_ERROR);
|