错误总结-apache-CXF

来源:互联网 发布:m4步枪 知乎 编辑:程序博客网 时间:2024/06/18 14:56

客户端
1、Could not find wsdl:binding operation info for web method print.
客户端接口加@WebService

2、org.apache.cxf.interceptor.Fault: Unexpected wrapper element {http://CXF.myweb.com/}printResponse found. Expected {http://CXFa.myweb.com/}printResponse.
服务端和客户端package不一致
3、Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:”http://cxf.myweb.com/“, local

@WebService
public interface IHelloWorldService {
@WebResult(name=”return”,targetNamespace=”http://cxf.myweb.com/”)
public String say(String name);

}
4、

Exception in thread "main" java.lang.IllegalArgumentException: An operation with name [{http://helloworld.cxf.myweb.com/}sayHi] already exists in this service

发布接口重复(不支持多态???)
5、包冲突
java.lang.NoSuchMethodError: javax.wsdl.xml.WSDLReader.readWSDL(Ljavax/wsdl/xml/WSDLLocator;Lorg/w3c

服务器:
1、Could not load Webservice SEI
实现类的endpointInterface的路径写错

2、Unexpected wrapper element {http://cxf.myweb.com/}getReader found.   Expected {http://reader.cxf.myweb.com/}getReader.    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:159)    at $Proxy37.getReader(Unknown Source)

服务点实现类没指定endpointInterface

Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"name"). Expected elements are (none)

序列化对象增加

@XmlRootElement(name="Reader")  @XmlAccessorType(XmlAccessType.FIELD)  @XmlType(propOrder={"name","password"})  

将头部文件
原来

cvc-complex-type.2.3: Element 'web-app' cannot have character [children], because the type's content
原创粉丝点击