users@glassfish.java.net

Re: First Web Service

From: heapifyman <heapifyman_at_gmail.com>
Date: Fri, 24 Apr 2009 14:30:05 +0200

glassfish_at_javadesktop.org schrieb:
> 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.

Have you tried using WS2 in the URL instead of WS3?

> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>