aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/moazs/scheme/SOAPUtils.java
AgeCommit message (Collapse)AuthorFilesLines
2020-03-03Update Copyright to 2020Christof Rabensteiner1-1/+1
2019-10-04Add @author Tag Where It Was MissingChristof Rabensteiner1-1/+4
2019-10-04Add Licenses, NOTICE, and License HeaderChristof Rabensteiner1-0/+21
2019-10-02For {TNVZ, MSG}: Switch to Soap 1.2Christof Rabensteiner1-6/+6
- But: Leave MZS Interface at Soap 1.1 - Add ClientFactory.createSOAP11 to ensure that we can talk back to the app.
2019-08-19Refactor Error MessagesChristof Rabensteiner1-3/+3
2019-07-22Test Flow of DeliveryRequest from "End-To-End" & Fix BugsChristof Rabensteiner1-11/+53
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)
2019-07-17Put MoaZSException on Diet & Handle Edge CasesChristof Rabensteiner1-3/+3
Reason: MoaZSException (and: its builder) were used to collect intermediary results while stepping through the delivery request backend. These results were needed to generate meaningful responses towards the sender application in case of error. However, the builder sprawled over too many interfaces (e.g. DeliveryRequestBackend and TNVZHelper) and it became difficult to understand from where intermediary results originated. Solution: Put MoaZSException on diet: - Remove all DeliveryAnswer fields from MoaZSException and refactor code base to ensure that the removed fields get sourced by other means. - Remove Builder since amount of parameters is manageable. Refactor DeliveryRequestBackend: - Instead of passing down the builder and using MoaZSException as the only source for intermediary results, we collect available results at the outermost stack frame (DeliveryRequestBackend.accept) and only retrieve results via exception if those results appear somewhere down the stack frame (E.g. PredviceNoteSent). We collect available results with the "fallbackAnswerBuilder" and switch to the msg client response, once received. Refactor MsgResponseBackend: - Handle cases (response missing, binary response missing) properly. - Integrate changes from MsgResponse.generateError() Refactor TVNZHelper: - Remove MoaZSExceptionBuilder from all interfaces. Refactor MsgResponse.generateError: - Change interface such that it's more intuitive. - Implement NotificationResponse.generateError. - Implement RequestStatusResponse.generateError. Others: - Replace all invocations against MoaZSException.Builder.
2019-06-28Remove EgovUtils DependencyChristof Rabensteiner1-1/+1
- EgovUtils were needed because of DomUtils. Replace it with eaaf components' DomUtils. - Add test case to ensure SoapUtils still works as intended. - Remove unused import statement
2019-05-28Remove Unused ImportsChristof Rabensteiner1-1/+0
2019-05-28Integrate Sign.Verification and Improve Error Handling of PipelineChristof Rabensteiner1-1/+3
- Ensure proper communication of errors between pipeline and mzs service by converting MoaZSExceptions into DeliveryRequestStatus messages. - Revise MoaZSException: Add optional fields; those fields are a) helpful to construct meaningful error messages and b) optional because, depending on where an exception appears, either existent or non-existent and thus optional. Add inner-class Builder. - Integrate Signature Verification into pipeline and add Stub for SignatureVerification. - Move TNVZResponse's Mimetype check into dedicated class (Reason: separate abstration layers). - Update api changes in testcases.
2019-05-27Intercept Incoming DeliveryRequestStatus and Store as byte[]Christof Rabensteiner1-0/+44
- 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.