aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java
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/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java
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/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java')
-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
1 files changed, 5 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) {