Hi,

I think the (tomcat) web app loader can not check directly inside WEB-INF,
so you need to put a schema resource to WEB-INF/classes and then try 

classpath:/myrequest.xsd

By the way, does anyone know if it is possible to make CXF pick up resources
directly in WEB-INF ?

cheers, Sergey



javamustang wrote:
> 
> Hi Sergey,
> 
> Following my beans.xml (which i put inside WEB-INF). If this entry is all
> to do, would be cool! 
> (I put my xsd inside WEB-INF)
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xmlns:jaxrs="http://cxf.apache.org/jaxrs";
>   xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxrs
> http://cxf.apache.org/schemas/jaxrs.xsd";>
> 
>   <!-- do not use import statements if CXFServlet init parameters link to
> this beans.xml --> 
> 
>   <import resource="classpath:META-INF/cxf/cxf.xml" />
>   <import
> resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
>   <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> 
>   <jaxrs:server id="customerService" address="/service1">
>  
>  <jaxrs:schemaLocations>
>     
> <jaxrs:schemaLocation>classpath:WEB-INF/myrequest.xsd</jaxrs:schemaLocation>
>   </jaxrs:schemaLocations>
>     <jaxrs:serviceBeans>
>       <ref bean="myBean" />
>     </jaxrs:serviceBeans>
>   </jaxrs:server>
>    <bean id="myBean" class="webservice.MyWebservice" />
> </beans>
> 
> -----------------------------------------------------
> I tried also following version, which seems to find the file (wrong
> filename gives a warning during context start).
> 
> <bean id="jaxbProvider"
> class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
> <property name="schemas">
> <list>
> <value>C:\dev\xsd\myrequest.xsd</value>
> </list>
> </property>
> </bean>
> 
> -----------------------
> Do i need something else additionally, like f.i following?
>   <jaxrs:properties>
>   <entry key="schema-validation-enabled" value="true"></entry>
>   </jaxrs:properties>  
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/xsd-Validation-and-CXFNonSpringJaxrsServlet-and-ssl-tp24202869p24273224.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to