Cxf开发webservice时遇到Can't find the request for xx's Observer

最近在用CXF开发webservice时遇到这个很郁闷的问题。配置一切都正常,启动tomcat也正常,但是当在IE浏览器中输入http://localhost:8080/工程名时http://localhost:8080/工程名时,报404,控制台报Can'tfindtherequestforhttp://localhost:8080/工程名'sObserver;

这就奇怪了,后来根据参照网址中的crossdqw的解答找到了解决方案,厉害!

你在客户端删掉web.xml中的cxf配置或者是在mapping中不要让它映射所有<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/加上路径/*</url-pattern>
</servlet-mapping>
不然就会首先映射CXFServlet,就会找不到服务!

 

参照:http://bbs.csdn.net/topics/370142426

 

猜你喜欢

转载自zhangshufei8001.iteye.com/blog/2377284