Hi,

It's a regression which was reported earlier on the list, due to the fact
that every endpoint now has its own ProviderFactory instance. The way this
setting was working originally was that the default providers were
reflectively checked and injected this property. It's been fixed again and
test-verified and should work fine in 2.2.3. In mean time, a valid and
faster approach is to explicitly register JAXBElementProvider. see for ex
how a schema holder can be registered here :

http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/resources/jaxrs/WEB-INF/beans.xml

you might want to register this utility holder in cases when you want to
have JAXB & JSON providers  
schema validating and sharing the same schema info.
Otherwise just register a util:list of schema locations as a
JAXBElementProvider 'schemas' property

cheers, Sergey



Nathaniel Auvil wrote:
> 
> After a few weeks i have come back to work on my Apache CXF project and my
> validation no longer is working.
> 
> I have:
> 
>     <jaxrs:server id="accountService" address="/accountsService">
>         <jaxrs:serviceBeans>
>             <ref bean="accountsBean" />
>         </jaxrs:serviceBeans>
>         <jaxrs:schemaLocations>
> 
> <jaxrs:schemaLocation>classpath:machsTypes-v1.xsd</jaxrs:schemaLocation>
>         </jaxrs:schemaLocations>
>         <jaxrs:providers>
>             <ref bean="webAppExceptionMapper" />
>         </jaxrs:providers>
>         <jaxrs:features>
>             <cxf:logging />
>         </jaxrs:features>
>     </jaxrs:server>
> 
> in my beans.xml but i do not see anything regarding the schema in the
> server
> log and i am sending invalid XML to and from my serivce without incident.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/REST-Spring-XML-Validation-tp24593149p24593991.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to