users@glassfish.java.net

Very Simple Web Service

From: <glassfish_at_javadesktop.org>
Date: Mon, 31 May 2010 14:24:31 PDT

Hello.. my first post here.. Java newb coming from .NET development
What am trying to do is actually very simple, don't need a fancy (heavy) IDE, notepad is more than enough
I downloaded and installed both JDK 1.6 & Glassfish v3, both installed correctly and are up and running
I need to create a simple HELLO web service, code goes like this


import javax.jws.WebService;
import javax.jws.WebMethod;

@WebService
public class Hello
{
        @WebMethod
        public String sayHello(String name)
        {
                return "Hello " + name + "!";
        }
}


What I need next is to simply put this in a .war file and place it in the "autodeploy" folder of the glassfish web server
Coming from the .NET world, things are as simple as creating your asmx file and copying it over to the "C:\inetpub\wwwroot\" directory
Is it possible to do the same with Java & Glassfish !?
[Message sent by forum member 'waelr']

http://forums.java.net/jive/thread.jspa?messageID=472169