Sergey,

On Tue June 30 2009 10:43:26 am Sergey Beryozkin wrote:
> 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 ?

The code for resolving the schemas should be updated to use the CXF 
ResourceManager.  (and probably CatalogManager as well if you are not using 
that).   The servlet installs a ResourceResolver in the ResourceManager that 
would resolve stuff in WEB-INF.

Dan


>
> 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:schemaLocati
> >on> </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>

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to