zoukankan      html  css  js  c++  java
  • spring整合xfire出现Document root element "beans", must match DOCTYPE root "null"错误解决方案

    fire自带的包下有个spring1.2.6的jar包,而工程的jar包是2.0的。

    解决方案:

    1.将原配置文件的头schema方式换为DOCTYPE方式,原配置文件如下(非maven)

    [java] view plain copy
     
    1. <?xml version="1.0" encoding="UTF-8"?>  
    2. <beans  
    3.     xmlns="http://www.springframework.org/schema/beans"  
    4.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    5.     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">  
    6.   
    7.     <bean id="helloWS" class="com.HelloWorld"/>  
    8.     <bean id="addressingHandler" class="org.codehaus.xfire.addressing.AddressingInHandler"/>  
    9.     <bean name="helloService" class="org.codehaus.xfire.spring.ServiceBean">  
    10.         <property name="serviceBean" ref="helloWS"/>  
    11.         <property name="serviceClass" value="com.IHelloWorld"/>  
    12.         <property name="inHandlers"><list><ref bean="addressingHandler"/></list></property>  
    13. </bean>  
    14.   
    15. </beans>  

    改成:

    [java] view plain copy
     
    1. <?xml version="1.0" encoding="UTF-8"?>  
    2. <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">  
    3. <beans>  
    4.   
    5.     <bean id="helloWS" class="com.HelloWorld"/>  
    6.     <bean id="addressingHandler" class="org.codehaus.xfire.addressing.AddressingInHandler"/>  
    7.       
    8.     <bean name="helloService" class="org.codehaus.xfire.spring.ServiceBean">  
    9.         <property name="serviceBean" ref="helloWS"/>  
    10.         <property name="serviceClass" value="com.IHelloWorld"/>  
    11.         <property name="inHandlers"><list><ref bean="addressingHandler"/></list></property>  
    12. </bean>  
    13.   
    14. </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>

    重新发布即可

  • 相关阅读:
    5.1点击4个按钮显示相应的div
    4.1邮箱的全选,全不选,反选
    3.1点击3个按钮变宽变高变色
    2.4点击按钮填色
    2.3点击菜单显示div再点击就隐藏
    2.2 点击按钮改变文本框中的文字内容
    linux系统编程视频 百度网盘下载
    Linux网络编程视频 百度网盘
    Sage Crm 权限原理分析
    Sage CRM 平衡区域树结构
  • 原文地址:https://www.cnblogs.com/antyi/p/6709032.html
Copyright © 2011-2022 走看看