Hi,

 

I are using the CXFNonSpringJaxrsServlet / Application to register our RESTful 
servlet similar to this example below from the section 'Configuring JAX-RS 
services in container without Spring'

 

The document says that we can do this

<servlet>

 <servlet-name>CXFServlet</servlet-name>

 <display-name>CXF Servlet</display-name>

 <servlet-class>

   org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet

 </servlet-class>

 <init-param>

  <param-name>jaxrs.serviceClasses</param-name>

  <param-value>

    org.apache.cxf.systest.jaxrs.BookStore1

    org.apache.cxf.systest.jaxrs.BookStore2                     

  </param-value>

 </init-param>

 <init-param>

  <param-name>jaxrs.providers</param-name>

  <param-value>

    org.apache.cxf.systest.jaxrs.BookStoreProvider1

    org.apache.cxf.systest.jaxrs.BookStoreProvider2                     

  </param-value>

 </init-param>

 <!-- enables schema validation -->

 <init-param>

  <param-name>jaxrs.schemaLocations</param-name>

  <param-value>

    classpath:/WEB-INF/schemas/schema1.xsd

    classpath:/WEB-INF/schemas/schema2.xsd                

  </param-value>

 </init-param> 

However the CXFNonSpringJaxrsServlet does this:

    public void loadBus(ServletConfig servletConfig) throws ServletException {

        super.loadBus(servletConfig);

        

        String applicationClass = 
servletConfig.getInitParameter(JAXRS_APPLICATION_PARAM);

        if (applicationClass != null) {

            createServerFromApplication(applicationClass);

  à        return; ß Never get to the code to setSchemasLocations

        }

It does not seem to use the schemaLocations init-param, only the 
javax.ws.rs.Application.  Is this an oversight?

 

Thanks,

 

Jon

 

 

 

Reply via email to