01: package demo.ws_addressing.server;
02:
03: import javax.xml.ws.Endpoint;
04:
05: public class Server {
06:
07: protected Server() throws Exception {
08: System.out.println("Starting Server");
09:
10: Object implementor = new GreeterImpl();
11: String address = "http://localhost:9000/SoapContext/SoapPort";
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 exiting");
21: System.exit(0);
22: }
23: }
|