Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring jaxrs.xsd验证错误_Spring_Cxf_Jax Rs - Fatal编程技术网

Spring jaxrs.xsd验证错误

Spring jaxrs.xsd验证错误,spring,cxf,jax-rs,Spring,Cxf,Jax Rs,我是CXF REST+Spring的新手。Eclipse表明my application-context.xml具有s4s att无效值错误:无法将jaxrs common:model解析为QName:未声明前缀“jaxrs common”。这是我的application-context.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/b

我是CXF REST+Spring的新手。Eclipse表明my application-context.xml具有s4s att无效值错误:无法将jaxrs common:model解析为QName:未声明前缀“jaxrs common”。这是我的application-context.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">

  <import resource="classpath:META-INF/cxf/cxf.xml" />
  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

  <bean class="org.apache.cxf.jaxrs.JAXRSServerFactoryBean" init-method="create">
    <property name="address" value="/service1"/>
    <property:serviceBeans>
      <ref bean="customerBean" />
    </property:serviceBeans>
  </jaxrs:server>

  <bean id="customerBean" class="demo.jaxrs.server.CustomerService" />
</beans>

我意识到jaxrs:server标记导致了这个错误

在中找到的jaxrs.xsd目前无法正确验证,因此您会遇到问题

一旦修复了cxf.apache.org上的xsd,这个特定的验证错误就会消失

PS:您提交的application-context.xml也是无效的xml,必须是复制粘贴失败


更新:jaxrs.xsd现在固定在cxf.apache.org上。您可能需要清理本地缓存(即删除工作区internet缓存文件夹:.metadata.plugins\org.eclipse.wst.internet.cache)并重新启动eclipse。

这是我们应该向apache报告的事情吗?有什么解决办法吗?我们有没有其他jaxrs.xsd的替代方案?这对我很有效顺便说一句:文件夹上的小错误(在.plugins.metadata\.plugins\org.eclipse.wst.internet.cache之前缺少反斜杠)