From cb9a76eaafd37f921006822bcfe043655288bc63 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Mon, 22 Jul 2019 13:02:19 +0200 Subject: Test Flow of DeliveryRequest from "End-To-End" & Fix Bugs Schema Changes: - Remove mzs:DeliveryRequest/TnvzMetaData because all metadata fields can be collected from DeliveryRequest and redundancy is not needed. Fixes and Refactoring in preprocess: - MzsDeliveryRequestValidator: Instead of returning false, throw an exception when a condition is not met, and explain which condition is not met / why it is not met in the exception's message. - Integrate interface change in ConfigProfileGenerator and DeliveryRequestAugmenter. - Rewrite and simplify DeliveryRequestAugmenter's augmentation. - ConfigUtil Fixes: Ensure that we do not override the wrong parameters while merging. This error appeared in tnvz / msg client, connection / receive timeout, key / trust store, and lax hostname verification / trust all. Fix Bugs in Interceptor / SoapUtils: - Problem: DOM access and information extraction was implemented somewhat sloppy. - SolutioN: Change DOM access interface to access DOM more efficiently. Add boundary checks and handle edge cases while extracting information from SOAP Messages. - Test those changes properly. Testing: - Implement Delivery Request Flow in ITEndToEndTest. - Start application on random port instead of fixed port when running integration tests. - Add assertions to tests in ITMzsServiceTest suite. Others Bug Fixes: - ServicesConfig: Ensure that mzs service and msg service run on different endpoint addresses (/msg and /mzs). - DeliveryRequestBackend: Throw exception when binary message is missing. Don't wrap the exception. - SaveResponseToFileSink: Wrap Response in JAXB Element (otherwise, marshaller does not recognize it) --- .../moazs/ITEndToEndTest/mzs-delivery-request.xml | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 src/test/resources/at/gv/egiz/moazs/ITEndToEndTest/mzs-delivery-request.xml (limited to 'src/test/resources/at/gv/egiz/moazs/ITEndToEndTest/mzs-delivery-request.xml') diff --git a/src/test/resources/at/gv/egiz/moazs/ITEndToEndTest/mzs-delivery-request.xml b/src/test/resources/at/gv/egiz/moazs/ITEndToEndTest/mzs-delivery-request.xml new file mode 100644 index 0000000..ef07686 --- /dev/null +++ b/src/test/resources/at/gv/egiz/moazs/ITEndToEndTest/mzs-delivery-request.xml @@ -0,0 +1,80 @@ + + + + + + + + kkvj693+tw99uW8UPuEK9en1LzZItkylPajkUUyJJDWQB78VGPkAuhCEk+TD12yQDD/WRglsf+JfQpjubIs/4l/ptluJ9teF3nwkNlu5Dm7mIjzgW1qxrDyomCmPvVxTWOCBuMUbOWRZBhOq+KvDQAu9Vv9KnqSfjYeDZrpHYu4= + urn:publicid:gv:at:cemtoken + + Bundesministerium für Testzwecke + + https://authority.gv.at/delivery_notification + + + + + Maxi + Mustermann1 + + 1984-01-24 + + + AT + 1010 + Wien + + Muststrasse + 10 + + + + + delivery-request-id + + VKABC + + WichtigeMitteilung + RSa + + + https://authority.gv.at/files/73bdf969781ba41fa07df1ff8439cf685c0db1c3 + brief.xml + text/xml + + SHA1 + 9b972c70fdaf5e1b26b3387c87b0ffb72e5940b6 + + 123401 + + + true + + http://localhost/tvnzservice + 0 + 0 + + + + true + target/tmp/ITEndToEndTestOut + + true + + true + + http://localhost/appurl + 0 + 0 + + + + + + + -- cgit v1.2.3