Hi On Fri, Nov 5, 2010 at 10:08 AM, jherry <[email protected]> wrote:
> > I'm implementing the vCloud API so there is multiple XML formats. Each > service can return and accept a specific XML format. > My project is a bit complex to post it here, i need to work on a smaller > (minimalist) one to understand how everything work. Thank you for your > help, > i will come back to this post as soon as i get a solution or a question. > By default, In CXF JAXRS, the schemas which are configured on a per-endpoint basis have to be related. For example, if you have A.xsd importing B.xsd then both A and B have to be specified (this will eventually be not required once we start supporting a server-side WADL development). A.xsd will be used to validate requests targeted to one or more root resources configured with a given jaxrs:endpoint. If you have multiple jaxrs endpoints, with the each one representing a specific (vCloud) resource(s) then you should have schemas 'attached' to individual endpoints as needed. If you have a single endpoint with multiple root resources, where each individual resource has to be validated by the resource-specific schema then what you can do is to extend JAXBElementProvider and create a composite provider which will return a context-specific schema instance - let me know please if you need more info about it hope it helps, Sergey > -- > View this message in context: > http://cxf.547215.n5.nabble.com/how-to-turn-on-schema-validation-for-NON-SPRING-CXF-tp567050p3251580.html > Sent from the cxf-user mailing list archive at Nabble.com. >
