服务发布文件如下
<?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:jaxws="http://cxf.apache.org/jaxws"
    xsi:schemaLocation="   
        http://www.springframework.org/schema/beans    
        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd   
        http://cxf.apache.org/jaxws    
        http://cxf.apache.org/schemas/jaxws.xsd">   
    
        <!--导入与CXF框架有关的xml-->   
        <import resource="classpath:META-INF/cxf/cxf.xml" />   
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />   
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> 
  
        <!--WebService接口-->   
    <jaxws:endpoint id="service"  
        implementor="com.itdcl.service.ServiceImpl" address="/Service">   
           
    </jaxws:endpoint>   
</beans>  
在<jaxws:endpoint id="service"  
        implementor="com.itdcl.service.ServiceImpl" address="/Service">   
           
    </jaxws:endpoint> 
处报错:
Multiple annotations found at this line:
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jaxws:endpoint'.
- schema_reference.4: Failed to read schema document 'http://cxf.apache.org/schemas/jaxws.xsd', because 1) could not find the 
 document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.好像是读不到 http://cxf.apache.org/jaxws    
        http://cxf.apache.org/schemas/jaxws.xsd
不知是否有人遇到过同样的问题,求助。

解决方案 »

  1.   

    试着修改一下头<beans>节点<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:jaxws="http://cxf.apache.org/jaxws"
    xmlns:soap="http://cxf.apache.org/bindings/soap"
    xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd
    http://cxf.apache.org/jaxws
    http://cxf.apache.org/schemas/jaxws.xsd
    http://cxf.apache.org/transports/http/configuration 
    http://cxf.apache.org/schemas/configuration/http-conf.xsd">
      

  2.   


    <?xml version="1.0" encoding="UTF-8"?><!-- START SNIPPET: beans -->
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    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/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
      

  3.   

    从网上下载了jaxws.xsd后,在myeclipse的xml catalog里配置了 http://cxf.apache.org/schemas/jaxws.xsd
    编译时就不报错了,但是在tomcat中发布时还是会报错...
      

  4.   

    我前几天做了一个:beans.xml的配置
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:jaxws="http://cxf.apache.org/jaxws"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"
    default-autowire="byType"> <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

    <import resource="spring-service.xml"/>
    <import resource="spring-dao.xml"/>
    <import resource="spring-action.xml"/>
    <import resource="spring-quartz.xml"/>

    <bean id="SearchServiceImpl" class="com.iotaad.webservice.business.SearchServiceImpl"></bean>

    <jaxws:endpoint 
      id="searchService" 
      implementor="#SearchServiceImpl" 
      address="/SearchService" >
      </jaxws:endpoint>
    web.xml的配置: <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>WEB-INF/applicationContext.xml</param-value>
    </context-param> <listener>
    <listener-class>
    org.springframework.web.context.ContextLoaderListener
    </listener-class>
    </listener> <servlet>
    <servlet-name>CXFServlet</servlet-name>
    <servlet-class>
    org.apache.cxf.transport.servlet.CXFServlet
    </servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet> <servlet-mapping>
    <servlet-name>CXFServlet</servlet-name>
    <url-pattern>/webservice/search/*</url-pattern> 
    </servlet-mapping>对比一下
      

  5.   

    我也有同样的问题,刚解决
    1.将cxf-2.3.3.jar包替换成cxf-2.2.6.jar
    2.重新编译工程,如果不行的话,将xml的开头替换成如下<beans xmlns="http://www.springframework.org/schema/beans"  
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
           xmlns:aop="http://www.springframework.org/schema/aop"  
           xmlns:context="http://www.springframework.org/schema/context"  
           xmlns:jaxws="http://cxf.apache.org/jaxws"  
           xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd  
            http://www.springframework.org/schema/aop 
    http://www.springframework.org/schema/aop/spring-aop-2.5.xsd  
            http://www.springframework.org/schema/context 
    http://www.springframework.org/schema/context/spring-context-2.5.xsd  
           http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">  
      

  6.   

    3.第二步执行过就没错误了,我是又将原来的替换过来了,重新编译并且不报错了。分析可能是cxf版本冲突造成的。