服务发布文件如下
<?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
不知是否有人遇到过同样的问题,求助。
<?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
不知是否有人遇到过同样的问题,求助。
解决方案 »
- EL表达式分次循环同一对象注意什么
- 如何进入服务器电脑的桌面?
- 如何将jsp页面上的指令分离出来
- 急!!!面试题求解 非常感谢
- Spring整合Hibernate时,如何应用Hibernate的配置文件而不要把Hibernate的配置信息全放进Spring的配置文件里?
- java.lang.IllegalArgumentException: Mapped Statements collection does not conta
- TOMCAT+SQL2000+JSP怎样才能运行顺利哟?
- httpurlconnection 如何设置代理服务器???急急急
- 谁有http://bbs.et8.net的注册用户或是其版主给弄个注册用户!!!
- 更新问题,求救!SOS
- 如何实现数据库自动发现(只知道ip和端口的情况,只要找到是什么类型的数据库就可以)
- 怎么样用正则表达式验证 不能有重复数字 并且只能从1-9升序 把下面代码修改下
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">
<?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" />
编译时就不报错了,但是在tomcat中发布时还是会报错...
<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>对比一下
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">