Hi Dan,
I did not know this. Since when is it done?
I think it is not so good to fail on invalid elements. As web services
are often used in loosely coupled scenarios I really liked that it did
not complain before.
At least it would be good to have a simple switch to turn that feature off.
Christian
Am 26.08.2011 17:09, schrieb Daniel Kulp:
On Friday, August 26, 2011 6:04:20 PM Dennis Sosnoski wrote:
Hi Christian,
It's true that JAXB ignores schemas by default, just matching elements
by name and ignoring any extra (or missing) ones.
Actually, by default, CXF configures JAXB to NOT ignore any extra elements.
Thus, this idea would require you to configure CXF out of defaults.
Basically, we got way too many "why are my fields null?" kind of questions and
almost all of them were a result of sending SOAP messages where the namespaces
on the elements were wrong (qualified vs unqualified usually). By default,
JAXB ignored the elements with the wrong namespaces so all the fields ended up
null. We added an error handler which now will throw an exception so people
know their message is wrong.
It's not full schema validation. It has no impact on performance. It just
fails for invalid/unexpected data.
Dan
--
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com