cxf异常but no declaration can be found for element 'jaxrs:client'.
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cxf异常but no declaration can be found for element 'jaxrs:client'.相关的知识,希望对你有一定的参考价值。
<?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"
xmlns:jaxws="http://cxf.apache.org/jaxws"
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
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd">
<jaxrs:client id="bookJaxrs" serviceClass="com.sf.it.restws.service.IBookService"
address="http://localhost:8080/restws/ws/book" inheritHeaders="true">
<jaxrs:headers>
<entry key="Accept" value="text/xml"/>
</jaxrs:headers>
</jaxrs:client>
</beans>
这里明明有jaxrs的,为什么老是提示没有申明jaxrs:client
Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 14 in XML document from class path resource [app-client.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jaxrs:client'.
用ApplicationContent加载,就报这个异常。
ApplicationContext context = new ClassPathXmlApplicationContext(
"applicationContext-client.xml");
以上是关于cxf异常but no declaration can be found for element 'jaxrs:client'.的主要内容,如果未能解决你的问题,请参考以下文章
《Spring实战》-- 'cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element
关于dubbo创建服务和引用服务时,会报错:cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration ca
spring “The matching wildcard is strict, but no declaration can be found for element”报错原
SyntaxError: Non-ASCII character 'xe5' in file test.py on line 1, but no encoding declared;(
SyntaxError: Non-ASCII character 'xe5' in file index.py on line 6, but no encoding declared(