《创建webService错误记录.doc》由会员分享,可在线阅读,更多相关《创建webService错误记录.doc(2页珍藏版)》请在金锄头文库上搜索。
1cfx+ssh1出错记录:1 使用CXF+Spring开发webservice报错Nobeannamedcxfisdefined原因:在web.xml中没有加入applicationContext-service.xmlorg.springframework.web.context.ContextLoaderListener contextConfigLocationclasspath:config/spring/*.xml!加载全部 2 解决Struts2的url和webService 接口url过滤的问题:提供三种方法:1 重写StrutsPrepareAndExecuteFilter Web.xml文件中cxf的配置 注意:第9行url.indexOf(schemas)0 表示当前的请求地址是访问app的地址而不是webService接口的地址第二种: 把struts的url修改成*.action 但是这种效果可能不成功第三种:利用struts2自带的正则匹配,应该说这算是最官方的解决方案了 在struts.properties中加正则匹配 struts.action.excludePattern=/schemas/.*(Struts.xml中常量)Eg:Struts2 在web,xml中的配置不变