aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/mzs
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-23 10:20:38 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-23 10:26:08 +0200
commit7665997a90c87a400f92ae9bf1ec6cc5a3099e16 (patch)
treef8a143a834a9204fbdfc64591ce0f61b60cb495b /src/main/resources/mzs
parent59a13bea5783aa666bcbcec793df19f129965ff3 (diff)
downloadmoa-zs-7665997a90c87a400f92ae9bf1ec6cc5a3099e16.tar.gz
moa-zs-7665997a90c87a400f92ae9bf1ec6cc5a3099e16.tar.bz2
moa-zs-7665997a90c87a400f92ae9bf1ec6cc5a3099e16.zip
MZS Schema Changes + Changes in Interface
- MZS cant reply with a msg:DeliveryRequestStatusType to a mzs:DeliveryRequest. Reason: unmarshalling a msg:DeliveryRequestStatusType with JAXB (after receiving the msg reply) breaks the signature in msg:DeliveryRequestStatusType. Why? Because JAXB marshalling tinkers with the namespaces and, as for the current state of knowledge, we cannot configure the JAXB marshaller to reconstruct a XML Document byte-by-byte such that a signature that went through this process can be verified successfully (see [1]). - For this reason, we revert back to mzs:DeliveryResponse and add new fields / remove obsolete fields / capture all changes between zusemsg 1.5.3 and zusemsg 2.0.0. - The easier solution would be to wrap and transmit signed data + signature in a binary (base64) container, such that apache cxf and other web service frameworks won't unmarshall them. This doesnt work because zusemsg 2.0.0 is final. app2mzs.xsd Changes in Detail : - Add DeliverySystem, ZSDeliveryID and GZ to MessageType (MessageType is the base type of DeliveryResponse.Success, -PartialSuccess, and -Error); Reason: It was added to zusemsg 2.0.0. - Add SignedDeliveryRequestStatus to MessageType. Reason: If msg returns signed reply, this element contains the reply as byte[] such that the signature does not break. - Add optional PreadvicenoteSend to ErrorType (because it was added in zusemsg 2.0.0) - Remove MZSDeliveryID from every instance because this ID does not exist anymore (moa zs does not maintain requests in a database). - Remove DocumentReference from ErrorType as it was removed from zusemsg 2.0.0. - Remove DeliveryConfirmation as node in DeliveryNotificiationType because it does not exist anymore in zusemsg 2.0.0; DeliveryConfirmation is also obsolete because all msg' replies are signed and need to be transferred to the sender application as a byte[], which is done by SignedDeliveryRequestStatus node in MessageType. - Remove DeliveryStatement as node in DeliveryNotificiationType because it does not exist anymore in zusemsg 2.0.0. Other Changes - Adapt codebase: MzsService returns mzs:DeliveryResponse. - Implement conversion from msg:DeliveryRequestStatus to mzs:DeliveryResponse. - Add store / retrieve interface to DeliveryRepository that stores signed delivery request statuses as byte[]. Temporary Changes - Disable integration tests which have external dependencies. [1] https://download.oracle.com/javaee-archive/jaxb.java.net/users/2007/03/6674.html Signed-off-by: Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>
Diffstat (limited to 'src/main/resources/mzs')
-rw-r--r--src/main/resources/mzs/app2mzs.xsd47
1 files changed, 19 insertions, 28 deletions
diff --git a/src/main/resources/mzs/app2mzs.xsd b/src/main/resources/mzs/app2mzs.xsd
index 74a63db..05a9ea4 100644
--- a/src/main/resources/mzs/app2mzs.xsd
+++ b/src/main/resources/mzs/app2mzs.xsd
@@ -92,7 +92,14 @@
<xs:element name="X509" type="xs:base64Binary" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
- <xs:element name="DeliveryResponse" type="msg:DeliveryRequestStatusType"/>
+ <xs:element name="DeliveryResponse" type="DeliveryResponseType"/>
+ <xs:complexType name="DeliveryResponseType">
+ <xs:choice>
+ <xs:element ref="PartialSuccess"/>
+ <xs:element ref="Success"/>
+ <xs:element ref="Error"/>
+ </xs:choice>
+ </xs:complexType>
<xs:element name="DeliveryNotification" type="DeliveryNotificationType">
<xs:annotation>
<xs:documentation>asynchronous communication moazs2app</xs:documentation>
@@ -102,8 +109,6 @@
<xs:choice>
<xs:element ref="Success"/>
<xs:element ref="Error"/>
- <xs:element name="DeliveryConfirmation" type="xs:base64Binary"/>
- <xs:element ref="DeliveryStatement"/>
</xs:choice>
</xs:complexType>
<xs:element name="DeliveryNotificationACK" type="DeliveryNotificationACKType">
@@ -114,7 +119,6 @@
<xs:complexType name="DeliveryNotificationACKType">
<xs:sequence>
<xs:element ref="AppDeliveryID"/>
- <xs:element ref="MZSDeliveryID"/>
</xs:sequence>
</xs:complexType>
<xs:element name="AppDeliveryID" nillable="false">
@@ -125,7 +129,6 @@
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="MZSDeliveryID" type="xs:string"/>
<xs:element name="Success" type="SuccessType">
<xs:annotation>
<xs:documentation>Zustellstück was successfully delivered to MOA-ZS</xs:documentation>
@@ -133,7 +136,12 @@
</xs:element>
<xs:complexType name="SuccessType">
<xs:complexContent>
- <xs:extension base="MessageType"/>
+ <xs:extension base="MessageType">
+ <xs:sequence>
+ <xs:element ref="msg:DeliveryTimestamp"/>
+ <xs:element ref="msg:RelayedViaERV" minOccurs="0"/>
+ </xs:sequence>
+ </xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="PartialSuccess" type="PartialSuccessType">
@@ -157,27 +165,7 @@
<xs:sequence>
<xs:element name="Code" type="xs:integer"/>
<xs:element name="Text" type="xs:string"/>
- <xs:element name="DocumentReference" type="xs:anyURI" minOccurs="0">
- <xs:annotation>
- <xs:documentation>download of callback attachment failed</xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:element name="DeliveryStatement" type="DeliveryStatementType">
- <xs:annotation>
- <xs:documentation>Zustellstück was successfully forwarded to the Zustellserver</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:complexType name="DeliveryStatementType">
- <xs:complexContent>
- <xs:extension base="MessageType">
- <xs:sequence>
- <xs:element name="DeliveryServer" type="xs:anyURI"/>
- <xs:element name="ZSDeliveryID" type="xs:token"/>
- <xs:element name="Timestamp" type="xs:dateTime"/>
+ <xs:element ref="msg:PreAdviceNoteSent" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -188,7 +176,10 @@
</xs:annotation>
<xs:sequence>
<xs:element ref="AppDeliveryID"/>
- <xs:element ref="MZSDeliveryID"/>
+ <xs:element ref="msg:DeliverySystem"/>
+ <xs:element ref="msg:ZSDeliveryID" />
+ <xs:element ref="msg:GZ" minOccurs="0"/>
+ <xs:element name="SignedDeliveryRequestStatus" type="xs:base64Binary" minOccurs="0"/>
</xs:sequence>
</xs:complexType>