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/StoreSOAPBodyBinaryInRepositoryInterceptor.java12
-rw-r--r--src/main/java/at/gv/egiz/moazs/scheme/SOAPUtils.java2
2 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/msg/StoreSOAPBodyBinaryInRepositoryInterceptor.java b/src/main/java/at/gv/egiz/moazs/msg/StoreSOAPBodyBinaryInRepositoryInterceptor.java
index d007286..4ebd2d0 100644
--- a/src/main/java/at/gv/egiz/moazs/msg/StoreSOAPBodyBinaryInRepositoryInterceptor.java
+++ b/src/main/java/at/gv/egiz/moazs/msg/StoreSOAPBodyBinaryInRepositoryInterceptor.java
@@ -15,8 +15,9 @@ import org.xml.sax.SAXException;
import javax.xml.parsers.ParserConfigurationException;
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
-import static at.gv.egiz.moazs.MoaZSException.moaZSExceptionBuilder;
+import static at.gv.egiz.moazs.MoaZSException.moaZSException;
@Component
public class StoreSOAPBodyBinaryInRepositoryInterceptor extends AbstractPhaseInterceptor<Message> {
@@ -41,17 +42,18 @@ public class StoreSOAPBodyBinaryInRepositoryInterceptor extends AbstractPhaseInt
try {
byte[] content = messageUtils.copyContent(message);
+ log.trace("Interceptor received this SOAP message: {}. ", new String(content, StandardCharsets.UTF_8));
+
if(content.length > 0) {
Element document = soapUtils.toDOM(content);
byte[] status = soapUtils.unwrapSoapEnvelope(document);
String appDeliveryID = soapUtils.getAppDeliveryIDFrom(document);
repository.addSignedDeliveryRequestStatus(status, appDeliveryID);
- log.info("Store binary DeliveryRequestStatus with AppDeliveryID={}", appDeliveryID);
+ log.trace("DeliveryRequestStatus with AppDeliveryID={} unwrapped and stored: {}. ",
+ appDeliveryID, new String(status, StandardCharsets.UTF_8));
}
} catch (ParserConfigurationException | SAXException | IOException | NullPointerException e) {
- throw moaZSExceptionBuilder("Could not extract signed data from message.")
- .withCause(e)
- .build();
+ throw moaZSException("Could not extract signed data from message.", e);
}
}
diff --git a/src/main/java/at/gv/egiz/moazs/scheme/SOAPUtils.java b/src/main/java/at/gv/egiz/moazs/scheme/SOAPUtils.java
index eee1152..8b8219a 100644
--- a/src/main/java/at/gv/egiz/moazs/scheme/SOAPUtils.java
+++ b/src/main/java/at/gv/egiz/moazs/scheme/SOAPUtils.java
@@ -1,6 +1,6 @@
package at.gv.egiz.moazs.scheme;
-import at.gv.util.DOMUtils;
+import at.gv.egiz.eaaf.core.impl.utils.DOMUtils;
import org.apache.cxf.binding.soap.Soap11;
import org.springframework.stereotype.Component;
import org.w3c.dom.Element;