On Friday, August 26, 2011 5:25:45 PM Christian Schneider wrote: > Hi Dan, > > I did not know this. Since when is it done?
Oct 2, 2009. Quite a while. :-) I think it was 2.2.4 or so. Long time ago. > 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. There is. We have a property that can be set on the endpoint of: "set-jaxb-validation-event-handler", "false" that restores the default JAXB behavior. Dan > > 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 -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
