zoukankan      html  css  js  c++  java
  • WebServiceException

    在用cxf做webservice的时候,在写客户端程序的时候,出现以下异常:

    Could not find wsdl:binding operation info for web method test

    Exception in thread "main" javax.xml.ws.WebServiceException: Could not find wsdl:binding operation info for web method test.
    	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:113)
    	at $Proxy29.test(Unknown Source)
    	at com.abc.test.UserTest.main(UserTest.java:10)

     原因:无法接收(绑定)返回的类型

    解决办法:在接受的类文件(接口)的上面加上一个annotation注解。

    import javax.jws.WebService;
    @WebService//很重要
    public interface UserService {
    	public String test(String userName);
    }

     然后就OK了,有的webservice的方法上面还要添加“@WebMethod”注解才可以!

  • 相关阅读:
    RabbitMQ管理
    vc6.0
    SystemTap
    undefined reference to `__imp_socket'
    采集小板校时
    点播播放不出来
    抓包注意事项
    下载rfc
    CLion快捷键
    rtsp vlc请求实例
  • 原文地址:https://www.cnblogs.com/pengyan5945/p/5218365.html
Copyright © 2011-2022 走看看