aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/mzs
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-07-16 14:33:26 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-07-16 14:33:26 +0200
commit8f3b805a558c4ed454db2b691032cea800d7b6dd (patch)
tree524a2c90e76bc52a5c90de3e2a54ebb679328cb7 /src/main/resources/mzs
parentd9e5864f48d261c06de1f1d34000ff6156155569 (diff)
downloadmoa-zs-8f3b805a558c4ed454db2b691032cea800d7b6dd.tar.gz
moa-zs-8f3b805a558c4ed454db2b691032cea800d7b6dd.tar.bz2
moa-zs-8f3b805a558c4ed454db2b691032cea800d7b6dd.zip
Implement ForwardResponseToService Sink And All Its Implications
MZS Schema Change: - Add configuration for ForwardResponseToServiceSink (add parameters in mzs:DeliveryRequest/Config) - Add sink configuration in application.yaml, convert from Spring Environment to ConfigType, and merge ConfigTypes. - Validate sink configuration completeness. Contract added: - Add contract mzs2app.wsdl: This contract specifies how mzs:DeliveryRequestStatus' and mzs:DeliveryNotifications are forwarded to the sender application. - Implement "ForwardResponseToService" Sink. - Add and implement MsgResponse.sendToMzsClient() : This is a somewhat unfortunate solution because, intuitively, sending should be done by it's caller, the "ForwardResponseToService"-sink. However, this solution prevents differences between msg:DeliveryRequestStatus and msg:DeliveryNotification (and code that needs to handle differences, i.e. sending) from sprawling outside of the respective MsgResponse derivatives. We move the entire "send" process into MsgResponse to prevent a hard-to-maintain "if type == notification then do x else to y" construct in ForwardResponseToServiceSink. Otherwise, introducing the MsgResponse wrapper was pointless.
Diffstat (limited to 'src/main/resources/mzs')
-rw-r--r--src/main/resources/mzs/app2mzs.xsd10
-rw-r--r--src/main/resources/mzs/mzs2app.wsdl78
2 files changed, 88 insertions, 0 deletions
diff --git a/src/main/resources/mzs/app2mzs.xsd b/src/main/resources/mzs/app2mzs.xsd
index 5733a00..a2d1bde 100644
--- a/src/main/resources/mzs/app2mzs.xsd
+++ b/src/main/resources/mzs/app2mzs.xsd
@@ -134,6 +134,7 @@
<xs:sequence>
<xs:element ref="SaveResponseToFile" minOccurs="0" />
<xs:element name="LogResponse" type="xs:boolean" minOccurs="0" />
+ <xs:element ref="ForwardResponseToService" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:element name="SaveResponseToFile" type="SaveResponseToFileType" />
@@ -143,7 +144,15 @@
<xs:element name="Path" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
+ <xs:element name="ForwardResponseToService" type="ForwardResponseToServiceType" />
+ <xs:complexType name="ForwardResponseToServiceType">
+ <xs:sequence>
+ <xs:element name="Active" type="xs:boolean" minOccurs="0"/>
+ <xs:element name="MzsClient" type="ClientType" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
<xs:element name="DeliveryResponse" type="DeliveryResponseType"/>
+ <xs:element name="DeliveryRequestStatus" type="DeliveryResponseType"/>
<xs:complexType name="DeliveryResponseType">
<xs:choice>
<xs:element ref="PartialSuccess"/>
@@ -162,6 +171,7 @@
<xs:element ref="Error"/>
</xs:choice>
</xs:complexType>
+ <xs:element name="DeliveryRequestStatusACK" type="DeliveryNotificationACKType" />
<xs:element name="DeliveryNotificationACK" type="DeliveryNotificationACKType">
<xs:annotation>
<xs:documentation>Webservice Response of ZSDeliveryNotification</xs:documentation>
diff --git a/src/main/resources/mzs/mzs2app.wsdl b/src/main/resources/mzs/mzs2app.wsdl
new file mode 100644
index 0000000..930c660
--- /dev/null
+++ b/src/main/resources/mzs/mzs2app.wsdl
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+ name="mzs2app"
+ targetNamespace="http://reference.e-government.gv.at/namespace/zustellung/mzs/app2mzs.wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:mzs="http://reference.e-government.gv.at/namespace/zustellung/mzs/app2mzs#"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://reference.e-government.gv.at/namespace/zustellung/mzs/app2mzs.wsdl">
+ <import location="app2mzs.xsd"
+ namespace="http://reference.e-government.gv.at/namespace/zustellung/mzs/app2mzs#" />
+
+ <message name="DeliveryRequestStatus">
+ <part name="DeliveryRequestStatus" element="mzs:DeliveryRequestStatus"/>
+ </message>
+ <message name="DeliveryRequestStatusACK">
+ <part name="DeliveryRequestStatusACK" element="mzs:DeliveryRequestStatusACK"/>
+ </message>
+ <message name="DeliveryNotification">
+ <part name="DeliveryNotification" element="mzs:DeliveryNotification"/>
+ </message>
+ <message name="DeliveryNotificationACK">
+ <part name="DeliveryNotificationACK" element="mzs:DeliveryNotificationACK"/>
+ </message>
+
+ <portType name="mzs2appPortType">
+ <operation name="forwardStatus">
+ <input message="tns:DeliveryRequestStatus"/>
+ <output message="tns:DeliveryRequestStatusACK"/>
+ </operation>
+ <operation name="forwardNotification">
+ <input message="tns:DeliveryNotification"/>
+ <output message="tns:DeliveryNotificationACK"/>
+ </operation>
+ </portType>
+
+ <binding name="mzs2appBinding" type="tns:mzs2appPortType">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="forwardStatus">
+ <soap:operation soapAction="mzs2appForwardStatus" style="document"/>
+ <input>
+ <soap:body
+ encodingStyle=""
+ message="tns:DeliveryRequestStatus"
+ part="DeliveryRequestStatus"
+ use="literal"> </soap:body>
+ </input>
+ <output>
+ <soap:body
+ encodingStyle=""
+ message="tns:DeliveryRequestStatusACK"
+ part="DeliveryRequestStatusACK"
+ use="literal"> </soap:body>
+ </output>
+ </operation>
+ <operation name="forwardNotification">
+ <soap:operation soapAction="mzs2appForwardNotification" style="document"/>
+ <input>
+ <soap:body
+ encodingStyle=""
+ message="tns:DeliveryNotification"
+ part="DeliveryNotification"
+ use="literal"> </soap:body>
+ </input>
+ <output>
+ <soap:body
+ encodingStyle=""
+ message="tns:DeliveryNotificationACK"
+ part="DeliveryNotificationACK"
+ use="literal"> </soap:body>
+ </output>
+ </operation>
+ </binding>
+ <service name="mzs2app">
+ <port binding="tns:mzs2appBinding" name="mzs2appPort">
+ <soap:address location="http://localhost:8080/app/services/mzs2app"/>
+ </port>
+ </service>
+</definitions>