aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/moazs/config
AgeCommit message (Collapse)AuthorFilesLines
2019-05-09Fix: Enable ApacheCXF's Automated Schema ValidationChristof Rabensteiner1-0/+7
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-08Refactor: Consolidate Schema-Related ComponentsChristof Rabensteiner1-3/+2
2019-05-08Fix Namespace Prefixes in Marshaled Messages (msg: instead of ns#:)Christof Rabensteiner1-5/+47
- 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-06Change Package Namespaces of JAXB Generated SourcesChristof Rabensteiner1-6/+4
- Reason: Improves readability and makes import statetemens shorter and more consistent
2019-04-30Add Optional mzs:DeliveryRequest/Config & Validate / Augment ItChristof Rabensteiner1-6/+0
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-17Refactor: Move Configs to config PackageChristof Rabensteiner3-0/+107