From c7551ed1dbf25fd786500a1516ddec9ec12dcf84 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Wed, 30 Oct 2019 16:06:12 +0100 Subject: Refactor: Rename ClientFactory.create Interface - Reason: Consistency --- .../java/at/gv/egiz/moazs/backend/DeliveryRequestBackend.java | 4 ++-- .../at/gv/egiz/moazs/backend/ForwardResponseToServiceSink.java | 2 +- src/main/java/at/gv/egiz/moazs/client/ClientFactory.java | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/java/at/gv') 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 { 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 { 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 create(ClientType params, Class clazz) { - return create(params, clazz, true); + public T createSOAP12(ClientType params, Class 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 createSoap11(ClientType params, Class clazz) { - return create(params, clazz, false); + public T createSOAP11(ClientType params, Class clazz) { + return createSOAPClient(params, clazz, false); } - private T create(ClientType params, Class clazz, boolean isSoap12) { + private T createSOAPClient(ClientType params, Class clazz, boolean isSoap12) { log.info("Create client for service {}", params.getURL()); -- cgit v1.2.3