From b3060f8ba40280d438e2b4b06b39aed84c587f7a Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Wed, 2 Oct 2019 14:30:43 +0200 Subject: For {TNVZ, MSG}: Switch to Soap 1.2 - But: Leave MZS Interface at Soap 1.1 - Add ClientFactory.createSOAP11 to ensure that we can talk back to the app. --- src/main/java/at/gv/egiz/moazs/scheme/SOAPUtils.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/at/gv/egiz/moazs/scheme') 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 f44fb3d..6ec120f 100644 --- a/src/main/java/at/gv/egiz/moazs/scheme/SOAPUtils.java +++ b/src/main/java/at/gv/egiz/moazs/scheme/SOAPUtils.java @@ -2,7 +2,7 @@ package at.gv.egiz.moazs.scheme; import at.gv.egiz.eaaf.core.impl.utils.DOMUtils; import at.gv.egiz.moazs.MoaZSException; -import org.apache.cxf.binding.soap.Soap11; +import org.apache.cxf.binding.soap.Soap12; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; @@ -26,8 +26,8 @@ import static at.gv.egiz.moazs.MoaZSException.moaZSException; public class SOAPUtils { private static final Logger log = LoggerFactory.getLogger(SOAPUtils.class); - private static final String SOAP_BODY_MISSING_ERROR_MSG = " is missing."; - private static final String SOAP_BODY_CHILDREN_MISSING_ERROR_MSG = " has no child elements."; + private static final String SOAP_BODY_MISSING_ERROR_MSG = " is missing."; + private static final String SOAP_BODY_CHILDREN_MISSING_ERROR_MSG = " has no child elements."; private static final String APP_DELIVERY_ID_FULL_TAG_NAME = ""; private static final String MULTIPLE_MSG = "Found multiple {} elements. Will choose first element."; private static final String APP_DELIVERY_ID_MISSING_ERROR_MSG = APP_DELIVERY_ID_FULL_TAG_NAME + " is missing."; @@ -40,16 +40,16 @@ public class SOAPUtils { public Node getChildElementOfSoapBody(Element document) throws MoaZSException { - var bodyList = document.getElementsByTagNameNS(Soap11.SOAP_NAMESPACE, "Body"); + var bodyList = document.getElementsByTagNameNS(Soap12.SOAP_NAMESPACE, "Body"); if (bodyList.getLength() == 0) throw moaZSException(SOAP_BODY_MISSING_ERROR_MSG); - if (bodyList.getLength() > 1) log.warn(MULTIPLE_MSG, ""); + if (bodyList.getLength() > 1) log.warn(MULTIPLE_MSG, ""); var body = bodyList.item(0); var children = body.getChildNodes(); var candidates = filterNodeByType(children, Node.ELEMENT_NODE); if (candidates.isEmpty()) throw moaZSException(SOAP_BODY_CHILDREN_MISSING_ERROR_MSG); - if (candidates.size() > 1) log.warn(MULTIPLE_MSG, " child"); + if (candidates.size() > 1) log.warn(MULTIPLE_MSG, " child"); return candidates.get(0); } -- cgit v1.2.3