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>

    重新发布即可

  • 相关阅读:
    chrome请求cgi遇到net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)
    office激活秘钥
    Dynamic 365 中创建编码规则
    D365FO Tool – Automating Start and Stop Environments
    InventReserve on InventTable form button script
    XSLT Transformation XML to JSON D365FO Data Management
    Get started with deployment pipelines
    [Azure DevOps Dynamics] Automate CRM Solution Deployment
    Deploying Web resources or Plugins with Azure DevOps Pipeline
    Deploy and use a continuous build and test automation environment for Dynamics 365
  • 原文地址:https://www.cnblogs.com/antyi/p/6709032.html
Copyright © 2011-2022 走看看