aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-05-13Test: Add Assertion in Mzs2MsgConverterTestChristof Rabensteiner1-3/+3
2019-05-13Refactor and Format Fixes in PipelineChristof Rabensteiner1-10/+9
- Fix: Replace MessageFormat.format with String.format - Refactor: Replace RuntimeException with MoaZSException - Refactor: Use Method Reference
2019-05-13Refactor: Remove Unused MembersChristof Rabensteiner1-12/+2
2019-05-13Refactor: Remove Unused ImportsChristof Rabensteiner1-5/+0
2019-05-13Refactor + Fix: Replace MessageFormat.format with String.formatChristof Rabensteiner1-4/+3
- Reason: Using MessageFormat.format and String.format via static imports (meaning: code only contains `format()`) is confusing. - Format String Fix: Switch from argument position (`{0}`) to argument type specifies (`%s`).
2019-05-13Refactor: Remove 'throws RuntimeException' From SignatureChristof Rabensteiner1-1/+1
- Why was it there to begin with?
2019-05-13Refactor: Autowire All Parameters Once Instead of IndividuallyChristof Rabensteiner1-2/+3
2019-05-10Refactor Exception Handling in App2MzsChristof Rabensteiner2-5/+23
- Define dedicated runtime exception - Put AppDeliveryId in exception message
2019-05-10Refactor: Eliminate Non-Compliant HashMap InitializationChristof Rabensteiner1-8/+8
2019-05-10Setup Code Coverage Reports Via jacocoChristof Rabensteiner1-0/+32
2019-05-10Refactor: Rename DeliveryPreprocessor to AugmenterChristof Rabensteiner2-14/+9
- Reason: Preprocessor does not perform any validation anymore!
2019-05-10Remove TargetNamespace Declaration in App2MzsServiceChristof Rabensteiner1-4/+1
2019-05-10Fix Hardcoded WSDL locationsChristof Rabensteiner2-5/+10
2019-05-09Reactivate and Fix Unit TestsChristof Rabensteiner4-87/+117
- Relax Validation for now by only validating incoming requests.
2019-05-09Fix: Enable ApacheCXF's Automated Schema ValidationChristof Rabensteiner5-55/+92
Problem: Apache CXF does not validate incoming mzs:DeliveryRequests automatically. Per default, validation is off (performs better). However, (1) we need to validate incoming requests, and (2) automated CXF validation requires less maintenance and is expected to be more stable than manual validation. Solution: - Add @SchemaValidation annotation to @Service. - Endpoint Configuration: set WsdlLocation and ServiceName (needed to prevent parser errors; see [1]). Without those, CXF validates against generated classes and not against the WSDL spec, and generated classes do not contain format restrictions. Add a testcase with an invalid delivery request ("rejectBothProfile- AndCorporateBody") to ensure that the validator works. [1] https://stackoverflow.com/questions/2231779/cxf-and-validation-schema-restrictions-ignored
2019-05-08Add "Reject Missing Sender" Test CaseChristof Rabensteiner2-0/+52
2019-05-08Update validDeliveryRequest.soap (Now More Valid!)Christof Rabensteiner1-38/+42
2019-05-08Remove Obsolete Validation TestcaseChristof Rabensteiner2-57/+0
- Reason: Converter does not perform validation
2019-05-08WIP delivery request validationChristof Rabensteiner3-12/+42
2019-05-08Refactor pom.xml: Prevent Copy-Paste Arguments with Default OptionsChristof Rabensteiner1-28/+15
2019-05-08Refactor: Consolidate Schema-Related ComponentsChristof Rabensteiner7-9/+9
2019-05-08Refactor pom.xml: Eliminate Duplicated Namespaces and PackagesChristof Rabensteiner1-26/+26
2019-05-08Fix Namespace Prefixes in Marshaled Messages (msg: instead of ns#:)Christof Rabensteiner4-14/+117
- Implement own NamespacePrefixMapper that maps prefixes depending on whether a msg or a mzs object is being marshaled. - Namespaces are not hardcoded but extracted from jaxb's generated sources (somewhat indirect, can be considered a hack, but there's no public API to extract namespaces)
2019-05-08Implement Pipeline Flow and mzs2msg ConversionChristof Rabensteiner9-21/+583
- Implement and test conversion from mzs:DeliveryRequest to msg:DeliveryRequest with the "convert-pojos-by-hand"-strategy. Reason: The chosen strategy benefits from JAXB's strong typing, which is useful in this scenario: Differences between msg and mzs are nuanced and easy to overlook. The chosen strategy is, unfortunately, verbose and could become expensive to maintain. - Update SameThreadDeliveryPipeline: Integrate tnvz query, conversion, and msg query. - Add MsgClient stub. tnvz: - Change TnvzClient stub interface. - Implement mimetype mismatch check from tnvz Response. - Put p:Identification from tnvz response into msg:DeliveryRequest. MZS Schema changes: - Replace DeliveryRequest/Sender/Person with CorporateBody (because thats the only sender that is allowed by zusemsg) and add a SenderProfile choice. - Add ID Attribute to DeliveryRequest/Sender because msg/DeliveryRequest/Sender/AbstractSenderPersonType also has an id attribute. - Remove PersonDataType because it's dead code.
2019-05-06WIP tnvz integrationChristof Rabensteiner2-2/+3
2019-05-06Ignore IDE Generated FilesChristof Rabensteiner1-0/+2
2019-05-06Add zusetnvz SchemaChristof Rabensteiner5-0/+637
2019-05-06Remove Needless zusemsg Scheme Binding ArgumentsChristof Rabensteiner1-6/+0
- Reason: Redefining mzs packages is not neccessary for zusemsg related jaxb classes because zusemsg does not rely on mzs.
2019-05-06Change Package Namespaces of JAXB Generated SourcesChristof Rabensteiner11-36/+52
- Reason: Improves readability and makes import statetemens shorter and more consistent
2019-04-30Generate SoapFault instead of DRStatus/Error MessageChristof Rabensteiner3-35/+8
- App2MZS Server: Instead of generating a DeliveryRequestStatus/Error Message, we throw an exception. This will generate a SoapFault (including a 500 http status code), which is more appropriate. - Fix possible NPE of deliveryRequest.getMetadata().getAppDeliveryID() by moving appDeliveryID initialization into the TimeOutException catch block - pom.xml: Remove hamcrest dependency, as not needed for now.
2019-04-30Refactor: Reduce Vertical Space Bewteen Method Def. and Invoc.Christof Rabensteiner1-13/+13
2019-04-30Add Optional mzs:DeliveryRequest/Config & Validate / Augment ItChristof Rabensteiner12-58/+228
Add Optional "Config" to MZS Schema: - Add mzs:DeliveryRequest/Config Element with a "PerformQueryPersonRequest" node - The config element contains parameters that are interpreted by moa-zs and not forwarded to the ZD - The boolean PerformQueryPersonRequest tells moa-zs if moa-zs should perform a QueryPersonRequest towards the TNVZ. - If config is missing, moa-zs augments the delivery request with parameters from the app's configuartion or the default configuartion Other Changes: - Validate and augment incoming requests with the DeliveryPreprocessor. - Add stub for TlnvzClient. - Remove some leftover ObjectFactory imports (because of the builder they are not needed anymore) Fixes - Fixed incorrect API usage of Messageformat.format: format string needs an index. pom.xml - Add Hamcrest Dependency (for writing more expressive tests) - Add copy constructor to JAXB Builder Testing - Test validation of incoming request - Refactor testcases to improve readability
2019-04-29Make JAXB Objects Immutable and Add Builder UtilityChristof Rabensteiner4-127/+49
- Use Immutable-XJC from https://github.com/sabomichal/immutable-xjc - Update existing JAXB-object manipulations to use the Builder - Remove jaxbMarshallerTest (as it relies on mutable JAXB interfaces) Reason for making JAXB objects immutable: I put JAXB objects in the repository. Depending on the configuration, the repository can be a simple hashmap; in that case I might end up sharing JAXB objects between threads. Immutable shared object should make life a little simpler.
2019-04-29Document DeliveryPipeline InterfaceChristof Rabensteiner1-1/+6
2019-04-29Fix GroupIDChristof Rabensteiner1-1/+1
2019-04-18Mock Pipeline in App2MzsServiceTestsChristof Rabensteiner2-13/+31
- Reason: App2MzsServiceTests only run through the app2mzs front end without doing any pipeline work.
2019-04-18Change App2mzs Interface and Init Delivery PipelineChristof Rabensteiner11-91/+200
- Change app2mzs interface: output message from app2mzs:DeliveryRequest was app2mzs:DeliveryResponse, now its msg:DeliveryRequestStatus. Reason: ZD returns msg:DeliveryRequestStatus which is signed. Moazs does not convert msg:DeliveryRequestStatus into app2mzs:DeliveryResponse because the conversion woudl break the signature. - App2MzsService: Make beans final and inject them with constructor; Refactor DeliveryRequestHandler into App2MZSService. - DeliveryPipeline: Add Interface and a "SameThreadImplementation" that executes the pipeline in the same threat and can be used in single mode. - DeliveryRepository: Augment interface for storing and retrieving request status objects; Add in-memory-implementation for status objects. - Utils: Add helper function for coalescing multiple values
2019-04-17Refactor: Move Configs to config PackageChristof Rabensteiner3-3/+4
2019-04-17Refactor: Move Repositories to Repository PackageChristof Rabensteiner4-3/+5
2019-04-17Add Redis and InMemory Implementation of DeliveryRequestRepositoryChristof Rabensteiner7-23/+80
- Deployer can choose which implementation to use (by activating - corresponding profile) - Add guava dependency - Extract DeliveryRequestRepository to Interface - Implement InMemory Repository using guava's cache
2019-04-16Add Getter for Repository + Refactor MarshallingChristof Rabensteiner4-28/+25
- mv MyMarshaller Marshaller - Remove jaxbcontext bean - Move Marshaller config to MarshallerConfig class
2019-04-16Store incoming delivery request on redis serverChristof Rabensteiner7-47/+194
- Connect to Redis server and implement RedisRepository - Add redis dependencies (spring-boot-starter, jedis, apache commons io). Latter dependencies are apparently needed and not included in the sprint-boot-starter; See https://github.com/spring-projects/spring-boot/issues/5718 and https://www.concretepage.com/questions/599 - Connect DeliveryRequestHandler to RedisRepository - Rewrote Marshalling: replace JaxbContext with spring-oxm JaxbMarshaller - Catch and log all exceptions in App2MZSService; Former: certain exceptions would go unnoticed, e.g. ConnectionRefused
2019-04-15Add Marshaller for autogenerated Schema TypesChristof Rabensteiner2-0/+73
2019-04-10Add Testcase For JAXB MarshallingChristof Rabensteiner2-1/+102
2019-04-09Propagate changes of zusemsg2.0.c into mzsChristof Rabensteiner2-18/+4
- Add Target to CorporateBodyType - Remove Authority - make DateOfBirth optional
2019-04-09Update zusemsg Spec to 2.0.cChristof Rabensteiner3-35/+13
2019-04-08Update Codebase to Match MZS Schema ChangesChristof Rabensteiner5-56/+66
- Important Fix: I forgot to annotate App2MzsService with @Service and autowire the App2MzsService object when creating the endpoint bean. For this reason, Spring did not autowire the dependencies in App2MzsService and I ended up with NullPointerExceptions in the testsuite. - Updated some more namespaces - Add objectFactory bean. objectfactory is autogenerated via the cxf-code-generation plugin, so i cannot annotate it with @Component or @Service. Alternative: create the @Bean by myself - Update the validDeliveryRequest SOAP Message to match the mzs 2.0.0 scheme.
2019-04-08Fix mzs:DReq/PayloadChristof Rabensteiner1-2/+2
- make one Payload Element mandatory - fix refernce to msg:DocumentClass
2019-04-08Update mzs:DReq/Payload SchemaChristof Rabensteiner1-3/+3
2019-04-08Update Namespace Package References to Schema filesChristof Rabensteiner3-7/+5