aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-05-14 15:14:49 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-05-14 15:14:49 +0200
commit67a903a6a33bd8b40e84a12a3ba9c556eb0eb275 (patch)
treeada123555368af37c883101c08b6702cacf199c6 /id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client
parenta58636545b497bc9ff5e2ffa6cf230dc75cc19bc (diff)
downloadmoa-id-spss-67a903a6a33bd8b40e84a12a3ba9c556eb0eb275.tar.gz
moa-id-spss-67a903a6a33bd8b40e84a12a3ba9c556eb0eb275.tar.bz2
moa-id-spss-67a903a6a33bd8b40e84a12a3ba9c556eb0eb275.zip
add additional SZRGW error handling
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClient.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClientException.java39
2 files changed, 39 insertions, 4 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClient.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClient.java
index a9f41819d..c675885c9 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClient.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClient.java
@@ -69,7 +69,7 @@ public class SZRGWClient {
if (serviceUrl.toLowerCase().startsWith("https")) {
Logger.trace("Using ssl for SZRGW client request.");
if (sslContext == null) {
- throw new SZRGWClientException("SSL context from configuration is empty. Please configure an SSL context in the configuration first.", null);
+ throw new SZRGWClientException();
}
requestContext.put(JAXWSProperties.SSL_SOCKET_FACTORY, sslContext);
@@ -95,7 +95,7 @@ public class SZRGWClient {
} catch (Exception e) {
Logger.warn("SZRGW Client initialization FAILED.", e);
- throw new SZRGWClientException("SZRGW Client initialization FAILED.", null);
+ throw new SZRGWClientException();
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClientException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClientException.java
index d15ded8a8..2038e3f18 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClientException.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClientException.java
@@ -28,12 +28,47 @@ public class SZRGWClientException extends MOAIDException{
private static final long serialVersionUID = 1L;
+ private String szrErrorCode = null;
+ private String szrErrorMessage = null;
+
public SZRGWClientException(String messageId, Object[] parameters) {
super(messageId, parameters);
}
- public SZRGWClientException(SZRGWClientException e1) {
- super("", null, e1);
+ public SZRGWClientException(String messageId) {
+ super(messageId, null);
+ }
+
+ public SZRGWClientException(String messageId, Throwable e1) {
+ super(messageId, null, e1);
+ }
+
+ public SZRGWClientException(String messageId, String szrErrorCode, String szrErrorMessage) {
+ super(messageId, null);
+ this.szrErrorCode = szrErrorCode;
+ this.szrErrorMessage = szrErrorMessage;
+ }
+
+ /**
+ *
+ */
+ public SZRGWClientException() {
+ super("service.09", null);
+ }
+
+ /**
+ * @return the szrErrorCode
+ */
+ public String getSzrErrorCode() {
+ return szrErrorCode;
+ }
+
+ /**
+ * @return the szrErrorMessage
+ */
+ public String getSzrErrorMessage() {
+ return szrErrorMessage;
}
+
}