Task #7910
Story #7832: migrate from JibX to JAXB for XML binding / codegen
schema validation behavior
0%
Description
unmarshalling objects using JAXB (without schema validation) can lead to changes in the values. For example, an invalid date leaves the corresponding Date property as null, instead of throwing an exception. I don't know what JiBX did in this situation.
Duplicate "identifier" fields in the systemMetadata, for example, doesn't cause problems - one of the identifier values is simply ignored.
Is this ok, or should we be schema validating when we unmarshal? How much did JiBX catch and alert us to in the past? there were no unit tests dedicated to this issue.
History
#1 Updated by Rob Nahf almost 7 years ago
TypeMarshaller currently validates upon marshalling (by default - there's a property setting to control this) but not on unmarshalling. validation on marshalling was added to mimic the JiBX behavior.
TypeMarshaller is the place to add it. This looks like a decent how-to: https://docs.oracle.com/cd/E19575-01/819-3669/bnbbc/index.html
#2 Updated by Rob Nahf almost 7 years ago
Consider putting this in 2.4.0 to simplify changing dependencies.
#3 Updated by Dave Vieglais almost 7 years ago
- Assignee changed from Robert Waltz to Rob Nahf
#4 Updated by Dave Vieglais almost 7 years ago
- Sprint set to CCI-2.4.0