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