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