KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > demo > handlers > server > Server


1 package demo.handlers.server;
2
3
4 import javax.xml.ws.Endpoint;
5
6 public class Server {
7
8     protected Server() throws Exception JavaDoc {
9         System.out.println("Starting AddNumbers Server");
10
11         Object JavaDoc implementor = new AddNumbersImpl();
12         String JavaDoc address = "http://localhost:9000/handlers/AddNumbersService/AddNumbersPort";
13         Endpoint.publish(address, implementor);
14     }
15
16     public static void main(String JavaDoc args[]) throws Exception JavaDoc {
17         new Server();
18         System.out.println("Server ready...");
19         
20         Thread.sleep(5 * 60 * 1000);
21         System.out.println("Server exiting");
22         System.exit(0);
23     }
24 }
Popular Tags