Results 1 to 6 of 6
  1. #1
    wael is offline Member
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Default Very Simple Web Service

    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

    Java Code:
    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 !?

    Thank you

  2. #2
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    I recommend watching Google video ;)

    Something like a YouTube - web service tutorial

    Study Googling, pal ;)
    If my answer helped you. Please click my "REP" button and add a comment
    Have a Good Java Coding :)

  3. #3
    wael is offline Member
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Default

    I already know how to build a web service with NetBeans.. but I dont want that! I want to do this myself writing all the necessary code without any hidden stuff by the IDE in order to get a better understanding of what's happening!

  4. #4
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    162
    Rep Power
    6

    Default

    hi wael
    i'm also following u.i want to create a new webservice by not pad but dont know how can i start

    in my system there is java 1.6 ,Apache Tomcat 6.0

    then what i has to start
    1 write a webserver code as u given here then ..........??????????????

    then what is the need of axis
    what is the need of apache-cxf-2.1.3

    please clear me if u created the webservice by the notepad

    thanks

  5. #5
    wael is offline Member
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Default

    Sadly I didn't find a way to do this yet.. and from what I've been reading it is not possible at all

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,728
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by wael View Post
    Sadly I didn't find a way to do this yet.. and from what I've been reading it is not possible at all
    I don't know if it helps you much but I found a simple http server in the Java 1.6 SE distribution a little while ago; here's the little thread I started about this. It is quite complete, API documentation and all but very little known ...

    kind regards,

    Jos

Similar Threads

  1. Using a Web Service
    By ragnor2004 in forum Advanced Java
    Replies: 12
    Last Post: 02-06-2010, 01:57 AM
  2. Web service
    By mousumidas in forum Advanced Java
    Replies: 3
    Last Post: 01-28-2010, 10:12 AM
  3. how to call service method inside another service
    By kirtichopra2003 in forum Web Frameworks
    Replies: 1
    Last Post: 10-24-2009, 03:19 AM
  4. New simple application using a simple database
    By webbusiness23 in forum New To Java
    Replies: 9
    Last Post: 08-03-2009, 03:55 AM
  5. Replies: 2
    Last Post: 05-04-2008, 06:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •