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

异常信息如下:


    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,异常便可解决

你可能感兴趣的:(异常:javax.xml.ws.WebServiceException: Could not find wsdl:binding operation info for web method sayHi)