aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/gv/egiz')
-rw-r--r--src/main/java/at/gv/egiz/moazs/msg/MsgClient.java4
-rw-r--r--src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java19
-rw-r--r--src/main/java/at/gv/egiz/moazs/preprocess/ConfigUtil.java10
3 files changed, 27 insertions, 6 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/msg/MsgClient.java b/src/main/java/at/gv/egiz/moazs/msg/MsgClient.java
index 84a7801..d834eff 100644
--- a/src/main/java/at/gv/egiz/moazs/msg/MsgClient.java
+++ b/src/main/java/at/gv/egiz/moazs/msg/MsgClient.java
@@ -31,8 +31,8 @@ public class MsgClient {
private final String address;
//TODO: make configurable
- private final int connectionTimeout = 60;
- private final int receiveTimeout = 60;
+ private final int connectionTimeout = 0;
+ private final int receiveTimeout = 0;
@Nullable
private final SSLContext sslContext;
diff --git a/src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java b/src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java
index d4cc9f1..071a243 100644
--- a/src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java
+++ b/src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java
@@ -4,6 +4,9 @@ import at.gv.egiz.moazs.util.FileUtils;
import at.gv.egiz.moazs.util.SSLContextCreator;
import at.gv.zustellung.app2mzs.xsd.ClientType;
import at.gv.zustellung.app2mzs.xsd.KeyStoreType;
+import com.sun.istack.Nullable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -14,6 +17,8 @@ import static at.gv.zustellung.app2mzs.xsd.KeyStoreType.keyStoreTypeBuilder;
@Component
public class MsgClientFactory {
+ private static final Logger log = LoggerFactory.getLogger(MsgClientFactory.class);
+
private final StoreSOAPBodyBinaryInRepositoryInterceptor storeResponseInterceptor;
private final SSLContextCreator sslContextCreator;
private final FileUtils fileUtils;
@@ -47,10 +52,16 @@ public class MsgClientFactory {
return new MsgClient(storeResponseInterceptor, params.getURL(), sslContext);
}
- private KeyStoreType resolveKeyStorePath(KeyStoreType store) {
- return store == null ? null
- : keyStoreTypeBuilder(store)
- .withFileName(fileUtils.determinePath(store.getFileName()))
+ private KeyStoreType resolveKeyStorePath(@Nullable KeyStoreType store) {
+
+ if (store == null) return null;
+
+ var resolvedURI = "file:" + fileUtils.determinePath(store.getFileName());
+
+ log.trace("Resolved key store path from {} to {}.", store.getFileName(), resolvedURI);
+
+ return keyStoreTypeBuilder(store)
+ .withFileName(resolvedURI)
.build();
}
diff --git a/src/main/java/at/gv/egiz/moazs/preprocess/ConfigUtil.java b/src/main/java/at/gv/egiz/moazs/preprocess/ConfigUtil.java
index 1befd1d..aa86873 100644
--- a/src/main/java/at/gv/egiz/moazs/preprocess/ConfigUtil.java
+++ b/src/main/java/at/gv/egiz/moazs/preprocess/ConfigUtil.java
@@ -138,6 +138,11 @@ public class ConfigUtil {
}
private ClientType merge(ClientType primary, ClientType fallback) {
+
+ if (fallback == null) {
+ return primary;
+ }
+
var builder = clientTypeBuilder(fallback);
if (primary.getURL() != null) {
@@ -152,6 +157,11 @@ public class ConfigUtil {
}
private SSLType merge(SSLType primary, SSLType fallback) {
+
+ if (fallback == null) {
+ return primary;
+ }
+
var builder = SSLTypeBuilder(fallback);
if (primary.getKeyStore() != null) {