diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-05-27 09:46:36 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-05-27 10:28:56 +0200 |
commit | 695ab1f836160d40c4352a2c3127f4f687912817 (patch) | |
tree | cd23bf0e2f6430bd2f5caf40825705e3fe644f98 /src/main/java/at/gv/egiz/moazs/scheme/MoaZSPrefixMapper.java | |
parent | 0a316ada10bb88720dd15958168409fcb9fcf800 (diff) | |
download | moa-zs-695ab1f836160d40c4352a2c3127f4f687912817.tar.gz moa-zs-695ab1f836160d40c4352a2c3127f4f687912817.tar.bz2 moa-zs-695ab1f836160d40c4352a2c3127f4f687912817.zip |
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.
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/scheme/MoaZSPrefixMapper.java')
-rw-r--r-- | src/main/java/at/gv/egiz/moazs/scheme/MoaZSPrefixMapper.java | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/scheme/MoaZSPrefixMapper.java b/src/main/java/at/gv/egiz/moazs/scheme/MoaZSPrefixMapper.java index faee8a5..d725ce6 100644 --- a/src/main/java/at/gv/egiz/moazs/scheme/MoaZSPrefixMapper.java +++ b/src/main/java/at/gv/egiz/moazs/scheme/MoaZSPrefixMapper.java @@ -12,43 +12,21 @@ public class MoaZSPrefixMapper extends NamespacePrefixMapper { private final Map<String, String> map = new HashMap<>(); public MoaZSPrefixMapper() { - map.put(getMsgNamespaceUri(), "msg"); - map.put(getMsgPNamespaceUri(), "msgp"); - map.put(getMzsNamespaceUri(), "mzs"); - map.put(getMzsPNamespaceUri(), "mzsp"); - map.put(getDsigNamespaceUri(), "dsig"); + map.put(NameSpace.MSG, "msg"); + map.put(NameSpace.MSGP, "msgp"); + map.put(NameSpace.MZS, "mzs"); + map.put(NameSpace.MZSP, "mzsp"); + map.put(NameSpace.DSIG, "dsig"); } public MoaZSPrefixMapper(boolean isMzs) { this(); - map.put((isMzs) ? getMzsPNamespaceUri() : getMsgPNamespaceUri(), "p"); - map.put((isMzs) ? getMzsNamespaceUri() : getMsgNamespaceUri(), ""); + map.put((isMzs) ? NameSpace.MZSP : NameSpace.MSGP, "p"); + map.put((isMzs) ? NameSpace.MZS : NameSpace.MSG , ""); } @Override public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) { return map.getOrDefault(namespaceUri, suggestion); } - - private String getMsgNamespaceUri() { - return new at.gv.zustellung.msg.xsd.ObjectFactory().createDeliveryRequest(null).getName().getNamespaceURI(); - } - - private String getMsgPNamespaceUri() { - return new at.gv.zustellung.msg.xsd.persondata.ObjectFactory().createPerson(null).getName().getNamespaceURI(); - } - - private String getMzsNamespaceUri() { - return new at.gv.zustellung.app2mzs.xsd.ObjectFactory().createDeliveryRequest(null).getName().getNamespaceURI(); - } - - private String getMzsPNamespaceUri() { - return new at.gv.zustellung.app2mzs.xsd.persondata.ObjectFactory().createAbstractPersonData(null).getName().getNamespaceURI(); - } - - private String getDsigNamespaceUri() { - return new org.w3._2000._09.xmldsig_.ObjectFactory().createCanonicalizationMethod(null).getName().getNamespaceURI(); - } - - } |