CXF webservice的三个小问题
1、javax.xml.ws.WebServiceException: Could not find wsdl:binding operation info for web method XXXX BTW,服务端的接口上完全没必要加@WebService,目前CXF官网以及网上的大部分内容都加了这个不必要的声明 2、javax.xml.ws.soap.SOAPFaultException: Cannot create a secure XMLInputFactory 从http://blog.csdn.net/java_min/article/details/9833815得到的灵感,检查了一下我的包里面都有了stax2-api-3.1.x.jar 和 woodstox-core-asl-4.2.x.jar,那么,依然报错,于是就猜到大概有冲突的包或者版本不对的包,maven在包依赖这点上真是不遗余力的挖坑,解决思路很简单,找到这两个包的任意一个类,copy qualified name到java中,用eclipse查找一下是否有重复的类然后从maven中exclude即可 网上看到J2EE容器可能会有兼容问题,一并记录一下 http://cxf.apache.org/docs/application-server-specific-configuration-guide#ApplicationServerSpecificConfigurationGuide-ForWebSphere6.1.0.29+,V7andV8 3、javax.xml.ws.soap.SOAPFaultException: Unexpected wrapper element {http://ws.test.frost.org/}getWeather found.?? Expected {http://ws.frost.org/}getWeather.
法1,包路径改一致即可 法2,在客户端的@WebService加上参数(targetNamespace = "http://ws.frost.org/") (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |