Try to use:
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService(serviceName="Hi")
public class HelloWS {
@WebMethod
public String sayHello(String name) {
return "Hello " + name;
}
}
instead of code from article.
I don't know why but I just need to change serviceName and everything run well.
On my computer, if I use code from the article, an error about two servlets have the same url pattern:
java.lang.IllegalStateException: Servlet [HelloServiceService] and Servlet [HelloService] have the same url pattern: [/HelloServiceService]at org.glassfish.apf.AnnotationInfo_at_aeaea6
[Message sent by forum member 'xcirclex' (xcirclex2004_at_yahoo.com)]
http://forums.java.net/jive/thread.jspa?messageID=386615