cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <>
Subject Re: JAXB ingores @XmlElement(required=true) on unmarshalling in JAX-RS
Date Fri, 20 Feb 2009 17:09:44 GMT

May be JAXBElementProvider needs few tweaks (in the AbstractJAXBProvider) ? Schema validation
is supported there, see for ex [1].

But I believe you're talking about different type of validation. May be a proper Validator
can be created if it's required through 
the configuration. For ex, we can add a property which will enable the validation in general,
and if no schemas have been set then a 
default JAXB validator will be created

Cheers, Sergey


> I know this problem is specific to JAXB but I wonder if it's either known
> issue or I have wrong setup. I am trying to force check on required XML
> elements in JAX-RS request using CXF2.2/JAXB2.1. I can still successfully
> pass thru XML doc with missing elements leading to backend logic failing
> with NPEs etc.
> I've found one suggestion on specifying JAXB jars before CXF jar on
> classpath but it's hard to do with webapp classloader.
> Any ideas?
> cheers,
> andy.
> -- 
> View this message in context: 
> Sent from the cxf-user mailing list archive at

View raw message