一、项目环境
SpringMVC框架 版本:4.3.1
CXF 版本:3.1.6
二、问题现象
配置好相关配置文件,验证webService是否发布成功,访问:
http://localhost:8080/CXF_Spring/webservice/HelloWorld?wsdl
页面提示:
No service was found
后台提示:
WARNING: Can't find the the request for http://localhost:8080/CXF_Spring/webservice/HelloWorld's Observer
三、问题分析
WARNING: Can't find the the request for http://localhost:8080/CXF_Spring/webservice/HelloWorld's Observer
出现上述提示则意味着CXF的核心控制器没起作用,CXF的核心控制器要依赖Spring的ContextLoaderListner,而SpringMVC用的是DiapacherServlet的配置方式。问题搞清楚了,那么解决方案就很明显了。