spring整合xfire出现Document root element "beans", must match DOCTYPE root "null"错误解决方案
2017-04-14 15:15
561 查看
fire自带的包下有个spring1.2.6的jar包,而工程的jar包是2.0的。
解决方案:
1.将原配置文件的头schema方式换为DOCTYPE方式,原配置文件如下(非maven)
[java] view plain copy
<?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-2.0.xsd">
<bean id="helloWS" class="com.HelloWorld"/>
<bean id="addressingHandler" class="org.codehaus.xfire.addressing.AddressingInHandler"/>
<bean name="helloService" class="org.codehaus.xfire.spring.ServiceBean">
<property name="serviceBean" ref="helloWS"/>
<property name="serviceClass" value="com.IHelloWorld"/>
<property name="inHandlers"><list><ref bean="addressingHandler"/></list></property>
</bean>
</beans>
改成:
[java] view plain copy
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="helloWS" class="com.HelloWorld"/>
<bean id="addressingHandler" class="org.codehaus.xfire.addressing.AddressingInHandler"/>
<bean name="helloService" class="org.codehaus.xfire.spring.ServiceBean">
<property name="serviceBean" ref="helloWS"/>
<property name="serviceClass" value="com.IHelloWorld"/>
<property name="inHandlers"><list><ref bean="addressingHandler"/></list></property>
</bean>
</beans>
2.maven环境下建pom.xml的xfire调整以下:
<!-- xfire 1.2.6 -->
<dependency>
<groupId>org.codehaus.xfire</groupId>
<artifactId>xfire-spring</artifactId>
<version>1.2.6</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
</exclusions>
</dependency>
重新发布即可
解决方案:
1.将原配置文件的头schema方式换为DOCTYPE方式,原配置文件如下(非maven)
[java] view plain copy
<?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-2.0.xsd">
<bean id="helloWS" class="com.HelloWorld"/>
<bean id="addressingHandler" class="org.codehaus.xfire.addressing.AddressingInHandler"/>
<bean name="helloService" class="org.codehaus.xfire.spring.ServiceBean">
<property name="serviceBean" ref="helloWS"/>
<property name="serviceClass" value="com.IHelloWorld"/>
<property name="inHandlers"><list><ref bean="addressingHandler"/></list></property>
</bean>
</beans>
改成:
[java] view plain copy
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="helloWS" class="com.HelloWorld"/>
<bean id="addressingHandler" class="org.codehaus.xfire.addressing.AddressingInHandler"/>
<bean name="helloService" class="org.codehaus.xfire.spring.ServiceBean">
<property name="serviceBean" ref="helloWS"/>
<property name="serviceClass" value="com.IHelloWorld"/>
<property name="inHandlers"><list><ref bean="addressingHandler"/></list></property>
</bean>
</beans>
2.maven环境下建pom.xml的xfire调整以下:
<!-- xfire 1.2.6 -->
<dependency>
<groupId>org.codehaus.xfire</groupId>
<artifactId>xfire-spring</artifactId>
<version>1.2.6</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
</exclusions>
</dependency>
重新发布即可
相关文章推荐
- spring整合xfire出现Document root element "beans", must match DOCTYPE root "null"错误解决方案
- spring整合xfire出现Document root element "beans", must match DOCTYPE root "null"错误解决方案
- Spring: Document root element "beans", must match DOCTYPE root "null
- Document root element "beans", must match DOCTYPE root "null".的错误提示
- Document root element "beans", must match DOCTYPE root "null"分析及解决方法
- Document root element "beans", must match DOCTYPE root "null"分析及解决方法
- Document root element "beans", must match DOCTYPE root "null 心异常
- Document root element "beans", must match DOCTYPE root "null".问题原因
- Document root element "beans", must match DOCTYPE root "null"分析及解决方法
- SAXParseException: cvc-complex-type.3.2.2&&Document root element "beans", must match DOCTYPE root "null"
- Document root element "beans", must match DOCTYPE root "null"
- Document root element "beans", must match DOCTYPE root "null"分析及解决方法
- Document root element "beans", must match DOCTYPE root "null".
- Document root element "beans", must match DOCTYPE root "null".
- Document root element "beans", must match DOCTYPE root "null"
- Document root element "beans", must match DOCTYPE root "null". 原因
- Document root element "beans", must match DOCTYPE root "null".
- org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".
- maven项目,去除jar包中的不想要的依赖关系(Document root element "beans", must match DOCTYPE root "null". )
- org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".