异常:javax.xml.ws.WebServiceException: Could not find wsdl:binding operation info for web method sayHi

来源:互联网 发布:iphone版呼死你软件 编辑:程序博客网 时间:2024/04/19 15:37

异常信息如下:


    Exception in thread "main" javax.xml.ws.WebServiceException: Could not find wsdl:binding operation info for web method sayHi.
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:122)
    at $Proxy18.sayHi(Unknown Source)
    at com.train.java.example.Example1.main(Example1.java:25)


原因是因为客户端的service中的方法没有和服务端的方法绑定,只需要在客户端的service接口上加注解@WebService,异常便可解决