users@glassfish.java.net

Re: Publishing to GlassFish V3 Error while deploying .ear file.

From: <glassfish_at_javadesktop.org>
Date: Sun, 14 Feb 2010 04:53:34 PST

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