1 package demo.handlers.server; 2 3 4 import javax.xml.ws.Endpoint; 5 6 public class Server { 7 8 protected Server() throws Exception { 9 System.out.println("Starting AddNumbers Server"); 10 11 Object implementor = new AddNumbersImpl(); 12 String address = "http://localhost:9000/handlers/AddNumbersService/AddNumbersPort"; 13 Endpoint.publish(address, implementor); 14 } 15 16 public static void main(String args[]) throws Exception { 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 |