From 695ab1f836160d40c4352a2c3127f4f687912817 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Mon, 27 May 2019 09:46:36 +0200 Subject: Intercept Incoming DeliveryRequestStatus and Store as byte[] - Add egovutils dependency (Reason: Need DomUtils to serialize / unserialize Soap Message via DOMParser) - Add Incerceptor to MsgClient / -Factory that stores the message content byte-by-byte in the DeliveryRepository. The format is required for successfully validating a DeliveryRequestStatus. - Add SoapUtils, which interacts with byte[] Soap message. - Add CXFMessageUtils, which interacts with CXF Messages from interceptor chains. - Refactor xsd namespaces: Move them out from the PrefixMapper and into a dedicated class. --- src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java') 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 9884bd5..82468bc 100644 --- a/src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java +++ b/src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java @@ -2,13 +2,21 @@ package at.gv.egiz.moazs.msg; import at.gv.zustellung.app2mzs.xsd.ConfigType; import at.gv.zustellung.msg.xsd.DeliveryRequestType; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component public class MsgClientFactory { + private final StoreSOAPBodyBinaryInRepositoryInterceptor storeResponseInterceptor; + + @Autowired + public MsgClientFactory(StoreSOAPBodyBinaryInRepositoryInterceptor storeResponseInterceptor) { + this.storeResponseInterceptor = storeResponseInterceptor; + } + public MsgClient create(DeliveryRequestType msgRequest, ConfigType config) { - return new MsgClient(msgRequest, config); + return new MsgClient(msgRequest, config, storeResponseInterceptor); } } -- cgit v1.2.3