Hello,
i am writing a simple echo server(just the webservice).When i try to compile the 'build.xml' file , i get the following error.
*********************************************************************
C:\javaeetutorial5\examples\jaxws\helloservice>asant -f build.xml
Buildfile: build.xml
-pre-init:
init:
default-ear:
-pre-compile:
bpp-actual-compilation:
[echo] Compiling helloservice
[mkdir] Created dir: C:\javaeetutorial5\examples\jaxws\helloservice\build\we
b\WEB-INF\classes
[javac] Compiling 1 source file to C:\javaeetutorial5\examples\jaxws\hellose
rvice\build\web\WEB-INF\classes
[javac] C:\javaeetutorial5\examples\jaxws\helloservice\src\java\helloservice
\endpoint\Hello.java:31: package javax.jws does not exist
[javac] import javax.jws.WebMethod;
[javac] ^
[javac] C:\javaeetutorial5\examples\jaxws\helloservice\src\java\helloservice
\endpoint\Hello.java:32: package javax.jws does not exist
[javac] import javax.jws.WebService;
[javac] ^
[javac] C:\javaeetutorial5\examples\jaxws\helloservice\src\java\helloservice
\endpoint\Hello.java:35: cannot find symbol
[javac] symbol: class WebService
[javac] @WebService
[javac] ^
[javac] C:\javaeetutorial5\examples\jaxws\helloservice\src\java\helloservice
\endpoint\Hello.java:39: cannot find symbol
[javac] symbol : class WebMethod
[javac] location: class helloservice.endpoint.Hello
[javac] @WebMethod
[javac] ^
[javac] 4 errors
BUILD FAILED
C:\javaeetutorial5\examples\bp-project\command-line-ant-tasks.xml:89: Compile fa
iled; see the compiler error output for details.
Total time: 4 seconds
C:\javaeetutorial5\examples\jaxws\helloservice>
*************************************************************************
The following is my webservice:
//////////////////////////////////////////////////////////////////////
package helloservice.endpoint;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public class Hello {
private
String message = new String("Hello, ");
@WebMethod
public String sayHello(String name) {
return message + name + ".";
}
}
///////////////////////////////////////////////////////////////////
Any help would be appreciated.
Thanks