17
If I have a class annotated with
@XmlType(name = "someDTO", propOrder = {
"firstField",
"secondField",
})
but the XML (from a SOAP response, say) looks like
<return><firstField>a</firstField><secondField>b</secondField><thirdField>c</thirdField></return>
My object will still get firstField and secondField populated, and thirdField is ignored.
Why is this? Will this always be the case? Is there a way to prevent object creation if extra fields are present?