自己也是刚刚开始学WebService如果不能解决问题请多多包含。
本人也是跟着视频学习如何写一个入门的WebService程序,在一开始就遇到了问题,在程序启动后,将自己写好的请求地址输入到浏览器后被提示“被禁止访问互联网”自己也是百度了半天,看了好多版本的解决问题的方法,自己也是不明白,现在将解决问题的方法整合一下。
现在开始看自己写的入门程序的主体。
这是我写的发布的主体程序,控制台也成功打印说明程序启动是没有的问题的,如果程序抛出以下问题应该是你的调用的类没有写@WebService注解
Exception in thread "main" java.lang.IllegalArgumentException: class cn.test.test.WeatherServiceImpl has neither @WebService nor @WebServiceProvider annotation
at com.sun.xml.internal.ws.server.EndpointFactory.verifyImplementorClass(EndpointFactory.java:424)
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.getPrimaryWsdl(EndpointImpl.java:367)
at com.sun.xml.internal.ws.transport.http.server.E