01: package demo.hwDispatch.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: System.out.println("Starting SoapService1");
11: Object implementor = new GreeterSoapMessageProvider();
12: String address = "http://localhost:9000/SoapContext/SoapPort1";
13: Endpoint.publish(address, implementor);
14:
15: System.out.println("Starting SoapService2");
16: implementor = new GreeterDOMSourceMessageProvider();
17: address = "http://localhost:9000/SoapContext/SoapPort2";
18: Endpoint.publish(address, implementor);
19:
20: System.out.println("Starting SoapService3");
21: implementor = new GreeterDOMSourcePayloadProvider();
22: address = "http://localhost:9000/SoapContext/SoapPort3";
23: Endpoint.publish(address, implementor);
24: }
25:
26: public static void main(String args[]) throws Exception {
27: new Server();
28: System.out.println("Server ready...");
29:
30: Thread.sleep(5 * 60 * 1000);
31: System.out.println("Server exiting");
32: System.exit(0);
33: }
34:
35: }
|