So you have a single jaxrs:serve with multiple root resources but only would like to validate the requests targeted at one of them ?
I can suggest the following : extend JAXBElementProvider and override its protected Schema getSchema() method. JAXBElementProvider has also a protected getContext() method which will give you MessageContext from which you can get to UriInfo and check the request URI. If request URI ends with some relative value that identifies a service that has to be validated then delegate to the superclass, otherwise return null. Cheers, Sergey On Thu, Jul 22, 2010 at 11:04 PM, Jason Chaffee <[email protected]> wrote: > Wonder why I couldn't find that the docs when I looked. :( > > I have the latter. I have several services under a single server. > > -----Original Message----- > From: Sergey Beryozkin [mailto:[email protected]] > Sent: Thursday, July 22, 2010 2:00 PM > To: [email protected] > Subject: Re: xsd for schema validation with jaxrs post/put > > Hi > > If you have many jaxrs:server endpoints then you can just configure an > individual endpoint with jaxrs:schemaLocations or by directly > configuring an > endpoint-specific JAXB and/or JSON provider, see > http://cxf.apache.org/docs/jax-rs.html#JAX-RS-Schemavalidation > > or do you have a single endpoint with multiple root resources where each > resource is representing a service ? > > cheers, Sergey > > On Thu, Jul 22, 2010 at 6:46 PM, Jason Chaffee <[email protected]> > wrote: > > > I would like the xml payload that is being posted or put into my > service > > to use an xsd for validation during unmarshalling. I have several > > services, but there is only one that I would like to enable this > > ability. > > > > > > > > I was looking through the documentation and I wasn't able to find any > > explanation of how this can be accomplished. Any insight, would be > > greatly appreciated. > > > > > > > > Thanks, > > > > > > > > Jason > > > > >
