users@glassfish.java.net

Re: First Web Service

From: <glassfish_at_javadesktop.org>
Date: Fri, 24 Apr 2009 05:26:07 PDT

Hi,
I followed this guide:

http://weblogs.java.net/blog/arungupta/archive/2007/02/creating_and_in_2.html

The name of My Project is WS2 (instead of hello), but my class is Hello.
When I insert this url:
http://localhost:8080/WS3/HelloService?wsdl
I receive this error:
HTTP Status 404 -

Why?
How can I solve?

My web.xml file is:
[code]
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                       http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
</web-app>
[/code]

My Hello class is:
[code]
package hello;

import javax.jws.WebMethod;

@javax.jws.WebService
public class Hello {

        @WebMethod
        public String sayHello(String name) {
                return "Hello " + name;
        }
        //
}
[/code]

Thanks, bye bye.
[Message sent by forum member 'abdujaparov' (abdujaparov)]

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