Configuring JAXRS to do schema validation for only some service beans

I have a Spring-configured CXF-powered JAX-RS service with two service beans:

 <jaxrs:server id="wsServices">
    <jaxrs:serviceBeans>
       <ref bean="a"/>
       <ref bean="b"/>
    </jaxrs:serviceBeans>
    <jaxrs:schemaLocations>
        <jaxrs:schemaLocation>
           classpath:/schema/webservices.xsd
        </jaxrs:schemaLocation>
    </jaxrs:schemaLocations>
 </jaxrs:server>

<bean id="a" class="AServiceImpl"/> 
<bean id="b" class="BServiceImpl" />

Unfortunately, only one of the two service beans is covered by the XSD file, so that that other one fails at schema validation.

I know how to turn off schema validation altogether, and then both services work fine (but I'd rather continue to have validation where it can be used).

How can I change the configuration to only use schema validation for bean a, but not for b?

Answers


Schema validation is set at the JAX-RS service level, so you can't do what you want directly (without adding to the schema) but you can have multiple <jaxrs:server> instances in the same webapp with different paths. That should let you set up what you want without too much trouble. (This is where the more sophisticated configuration approach of CXF comes into its own.)


Need Your Help

Hyperlinks delayed in working?

javascript html hyperlink jquery

This page is using jQuery to modify the links and then perform the page slide.

How can I get the DateTime for the start of the week?

c# datetime

How do I find the start of the week (both Sunday and Monday) knowing just the current time in C#?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.