aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-module-ehvd_integration/src/main
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2021-07-30 09:16:47 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2021-08-30 10:38:25 +0200
commit7abe41afdb6f454e02126dbc90fb0352d0d15f74 (patch)
treea59db3d7116e9e51967507240129f7301bab8318 /id/server/modules/moa-id-module-ehvd_integration/src/main
parent56af7bee462d70f08d0442254c632f39e50ec96f (diff)
downloadmoa-id-spss-7abe41afdb6f454e02126dbc90fb0352d0d15f74.tar.gz
moa-id-spss-7abe41afdb6f454e02126dbc90fb0352d0d15f74.tar.bz2
moa-id-spss-7abe41afdb6f454e02126dbc90fb0352d0d15f74.zip
throw a specific error in case of a EHVD response that contains no GDA information
Diffstat (limited to 'id/server/modules/moa-id-module-ehvd_integration/src/main')
-rw-r--r--id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java12
-rw-r--r--id/server/modules/moa-id-module-ehvd_integration/src/main/resources/resources/properties/id_messages.properties1
-rw-r--r--id/server/modules/moa-id-module-ehvd_integration/src/main/resources/resources/properties/protocol_response_statuscodes.properties1
3 files changed, 7 insertions, 7 deletions
diff --git a/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java b/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java
index ab4a70751..2ef79a141 100644
--- a/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java
+++ b/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java
@@ -51,6 +51,7 @@ public class EhvdCommunicationService implements IEhvdCommunication {
private static final String ERROR_EHVD_00 = "ehvd.00";
private static final String ERROR_EHVD_01 = "ehvd.01";
private static final String ERROR_EHVD_02 = "ehvd.02";
+ private static final String ERROR_EHVD_03 = "ehvd.03";
private static final String ERROR_CONFIG_05 = "config.05";
@Autowired
@@ -100,8 +101,7 @@ public class EhvdCommunicationService implements IEhvdCommunication {
// extract reason for this error
String errorMsg = e.getFault() != null
? StringUtils.isNotEmpty(e.getFault().getFaultString()) ? e.getFault().getFaultString() : e.getMessage()
- : e.getMessage();
-
+ : e.getMessage();
Logger.warn("EHVD communication failed with SOAP response: " + errorMsg, e);
throw new EhvdException(ERROR_EHVD_02, new Object[] {errorMsg}, e);
@@ -127,13 +127,11 @@ public class EhvdCommunicationService implements IEhvdCommunication {
}
} else {
- Logger.debug("Receive empty GDA response");
- // TODO: what we to in case of empty response?
+ Logger.info("Receive empty GDA response");
+ throw new EhvdException(ERROR_EHVD_03, new Object[] {});
+
}
-
- return Collections.emptyList();
-
}
private GetGdaDescriptors buildGdaRequest(String bPK) {
diff --git a/id/server/modules/moa-id-module-ehvd_integration/src/main/resources/resources/properties/id_messages.properties b/id/server/modules/moa-id-module-ehvd_integration/src/main/resources/resources/properties/id_messages.properties
index 104342a9d..643893413 100644
--- a/id/server/modules/moa-id-module-ehvd_integration/src/main/resources/resources/properties/id_messages.properties
+++ b/id/server/modules/moa-id-module-ehvd_integration/src/main/resources/resources/properties/id_messages.properties
@@ -1,5 +1,6 @@
ehvd.00=Für den abgefragtem GDA liegt keine Berechtigung vor
ehvd.01=Technischer Fehler bei der Abfrage von GDA Informationen. Ursache: {0}
ehvd.02=Fehler bei der Abfrage von GDA Informationen. Ursache: {0}
+ehvd.03=Antwort des EHVD Service beinhaltet keine GDA Informationen
ehvd.99=Allgemeiner Fehler bei der Abfrage des EHVD Service
diff --git a/id/server/modules/moa-id-module-ehvd_integration/src/main/resources/resources/properties/protocol_response_statuscodes.properties b/id/server/modules/moa-id-module-ehvd_integration/src/main/resources/resources/properties/protocol_response_statuscodes.properties
index 400994330..72048b8e3 100644
--- a/id/server/modules/moa-id-module-ehvd_integration/src/main/resources/resources/properties/protocol_response_statuscodes.properties
+++ b/id/server/modules/moa-id-module-ehvd_integration/src/main/resources/resources/properties/protocol_response_statuscodes.properties
@@ -4,4 +4,5 @@ test.02=zzzyyyxxx
ehvd.00=7000
ehvd.01=7001
ehvd.02=7001
+ehvd.03=7001
ehvd.99=7099 \ No newline at end of file