aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/gv/egiz/moazs/backend/DeliveryRequestBackend.java4
-rw-r--r--src/main/java/at/gv/egiz/moazs/backend/ForwardResponseToServiceSink.java2
-rw-r--r--src/main/java/at/gv/egiz/moazs/client/ClientFactory.java10
-rw-r--r--src/test/java/at/gv/egiz/moazs/DeliveryRequestBackendTest.java4
-rw-r--r--src/test/java/at/gv/egiz/moazs/ITEndToEndTest.java6
-rw-r--r--src/test/java/at/gv/egiz/moazs/ITSSLMsgClientTest.java2
6 files changed, 14 insertions, 14 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/backend/DeliveryRequestBackend.java b/src/main/java/at/gv/egiz/moazs/backend/DeliveryRequestBackend.java
index eb51476..9cbdd81 100644
--- a/src/main/java/at/gv/egiz/moazs/backend/DeliveryRequestBackend.java
+++ b/src/main/java/at/gv/egiz/moazs/backend/DeliveryRequestBackend.java
@@ -121,7 +121,7 @@ public class DeliveryRequestBackend implements Consumer<String> {
var msgRequest = buildMsgRequest(mzsRequest);
traceMsgRequest(msgRequest);
var msgClientParams = mzsRequest.getConfig().getMSGClient();
- App2ZusePort client = clientFactory.create(msgClientParams, App2ZusePort.class);
+ App2ZusePort client = clientFactory.createSOAP12(msgClientParams, App2ZusePort.class);
status = client.delivery(msgRequest);
traceMsgResponse(status);
@@ -159,7 +159,7 @@ public class DeliveryRequestBackend implements Consumer<String> {
if (mzsRequest.getConfig().isPerformQueryPersonRequest()) {
log.trace("Perform QueryPersonRequest. ");
var tnvzClientParams = mzsRequest.getConfig().getTNVZClient();
- TNVZServicePort tnvzPort = clientFactory.create(tnvzClientParams, TNVZServicePort.class);
+ TNVZServicePort tnvzPort = clientFactory.createSOAP12(tnvzClientParams, TNVZServicePort.class);
var identification = tnvzHelper.performQueryPersonRequest(mzsRequest, tnvzPort);
return converter.convert(mzsRequest, identification);
} else {
diff --git a/src/main/java/at/gv/egiz/moazs/backend/ForwardResponseToServiceSink.java b/src/main/java/at/gv/egiz/moazs/backend/ForwardResponseToServiceSink.java
index 26cf26e..b6f9b44 100644
--- a/src/main/java/at/gv/egiz/moazs/backend/ForwardResponseToServiceSink.java
+++ b/src/main/java/at/gv/egiz/moazs/backend/ForwardResponseToServiceSink.java
@@ -58,7 +58,7 @@ public class ForwardResponseToServiceSink {
log.info("Forward msg:{} with AppDeliveryID={} to service at {}.",
msgResponse.getRootElementLocalPart(), msgResponse.getAppDeliveryID(), params.getURL());
var binaryResponse = repository.retrieveBinaryResponse(msgResponse.getResponseID());
- Mzs2AppPortType client = factory.createSoap11(params, Mzs2AppPortType.class);
+ Mzs2AppPortType client = factory.createSOAP11(params, Mzs2AppPortType.class);
return msgResponse.sendToAppClient(converter, binaryResponse, client);
}
}
diff --git a/src/main/java/at/gv/egiz/moazs/client/ClientFactory.java b/src/main/java/at/gv/egiz/moazs/client/ClientFactory.java
index a14e693..c294aa3 100644
--- a/src/main/java/at/gv/egiz/moazs/client/ClientFactory.java
+++ b/src/main/java/at/gv/egiz/moazs/client/ClientFactory.java
@@ -84,8 +84,8 @@ public class ClientFactory {
* @param params for the client, such as service url and ssl parameters.
* @return the client
*/
- public <T> T create(ClientType params, Class<T> clazz) {
- return create(params, clazz, true);
+ public <T> T createSOAP12(ClientType params, Class<T> clazz) {
+ return createSOAPClient(params, clazz, true);
}
/**
@@ -94,12 +94,12 @@ public class ClientFactory {
* @param params for the client, such as service url and ssl parameters.
* @return the client
*/
- public <T> T createSoap11(ClientType params, Class<T> clazz) {
- return create(params, clazz, false);
+ public <T> T createSOAP11(ClientType params, Class<T> clazz) {
+ return createSOAPClient(params, clazz, false);
}
- private <T> T create(ClientType params, Class<T> clazz, boolean isSoap12) {
+ private <T> T createSOAPClient(ClientType params, Class<T> clazz, boolean isSoap12) {
log.info("Create client for service {}", params.getURL());
diff --git a/src/test/java/at/gv/egiz/moazs/DeliveryRequestBackendTest.java b/src/test/java/at/gv/egiz/moazs/DeliveryRequestBackendTest.java
index ba7c1c8..e1859b5 100644
--- a/src/test/java/at/gv/egiz/moazs/DeliveryRequestBackendTest.java
+++ b/src/test/java/at/gv/egiz/moazs/DeliveryRequestBackendTest.java
@@ -165,11 +165,11 @@ public class DeliveryRequestBackendTest {
when(converter.convert(eq(mzsRequest) )).thenReturn(msgRequest);
when(converter.convert(eq(mzsRequest), any())).thenReturn(msgRequest);
- when(clientFactory.create(any(), same(App2ZusePort.class))).thenReturn(msgClient);
+ when(clientFactory.createSOAP12(any(), same(App2ZusePort.class))).thenReturn(msgClient);
when(msgClient.delivery(msgRequest)).thenReturn(status);
if (tnvzRequest) {
- when(clientFactory.create(any(), same(TNVZServicePort.class))).thenReturn(tnvzClient);
+ when(clientFactory.createSOAP12(any(), same(TNVZServicePort.class))).thenReturn(tnvzClient);
when(tnvzHelper.performQueryPersonRequest(any(), any())).thenReturn(identification);
}
return status;
diff --git a/src/test/java/at/gv/egiz/moazs/ITEndToEndTest.java b/src/test/java/at/gv/egiz/moazs/ITEndToEndTest.java
index 76c0187..7e03a13 100644
--- a/src/test/java/at/gv/egiz/moazs/ITEndToEndTest.java
+++ b/src/test/java/at/gv/egiz/moazs/ITEndToEndTest.java
@@ -112,9 +112,9 @@ public class ITEndToEndTest {
var tnvz = mockTnvz();
var msg = mockMsg();
APP = mockApp();
- when(factory.create(any(), same(TNVZServicePort.class))).thenReturn(tnvz);
- when(factory.create(any(), same(App2ZusePort.class))).thenReturn(msg);
- when(factory.createSoap11(any(), same(Mzs2AppPortType.class))).thenReturn(APP);
+ when(factory.createSOAP12(any(), same(TNVZServicePort.class))).thenReturn(tnvz);
+ when(factory.createSOAP12(any(), same(App2ZusePort.class))).thenReturn(msg);
+ when(factory.createSOAP11(any(), same(Mzs2AppPortType.class))).thenReturn(APP);
return factory;
}
diff --git a/src/test/java/at/gv/egiz/moazs/ITSSLMsgClientTest.java b/src/test/java/at/gv/egiz/moazs/ITSSLMsgClientTest.java
index f880ae3..107ede5 100644
--- a/src/test/java/at/gv/egiz/moazs/ITSSLMsgClientTest.java
+++ b/src/test/java/at/gv/egiz/moazs/ITSSLMsgClientTest.java
@@ -86,7 +86,7 @@ public class ITSSLMsgClientTest {
}
private App2ZusePort createPort(ClientType params) {
- return factory.create(params, App2ZusePort.class);
+ return factory.createSOAP12(params, App2ZusePort.class);
}
// Requirements: