Does JAXB always ignore 'extra' elements not specified in @XmlType/propOrder?

crab29

New Member
If I have a class annotated with \[code\]@XmlType(name = "someDTO", propOrder = { "firstField", "secondField",})\[/code\] but the XML (from a SOAP response, say) looks like\[code\]<return><firstField>a</firstField><secondField>b</secondField><thirdField>c</thirdField></return>\[/code\]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?
 
Top