Creating Web services using the J2EE 1.4
Posted by mtwinkle on April 13, 2007
1. Design and Code the Service Endpoint Interface
What is Endpoint interface?
Ans. In which you declare the methods that a web service remote client may invoke on the service.
Endpoint interface must:
* It extends the java.rmi.Remote interface
* It does not have constant declarations such as public static final
* Its methods throw the java.rmi.RemoteException (or one of its subclasses)
* Its method parameters and return data types are supported JAX-RPC types
2. Implement the Service Endpoint Interface
1. Create folders D:\sun\AppServer\apps\build
2. apps directory contains the .java files, and the build directory contains the .class
prompt> javac -d build Math*.java
The -d option instructs the compiler to write the output .class files into the build directory:
3. Write a Configuration File config.xml
This file tells “wscompile” to create a WSDL file with the following information:
* The service name is MyFirstService.
* The WSDL namespace is urn:Foo.
* The classes for the service are in the math package under the build directory.
* The service endpoint interface is math.MathFace.
Download jws-dp (Java web services developer pack)
Add the jaxrpc/bin directory to your PATH environment variable.
echo Set up for JAX-RPC start……..
set JAXRPC_HOME=C:\Program Files\tomcat50-jwsdp\jaxrpc\
echo Set up for JAX-RPC completed successsfully!!
wscompile -define -mapping build/mapping.xml -d build -nd build -classpath build config.xml
Check if the sever started successfully:
Download SDK from
WAR File Creation using deploytool
Start the DeployTool by running the deploytool.bat file from the /bin/