blob: 442f8449e2a0ce3640c818524b26ad6e5416c884 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package derms.replica1;
import javax.xml.ws.Endpoint;
public class DERMSServerPublisher {
private static Endpoint[] endpoints = new Endpoint[3];
public static void main(String[] args) {
try {
endpoints[0] = Endpoint.publish("http://localhost:8387/ws/derms", new DERMSServer("MTL"));
endpoints[1] = Endpoint.publish("http://localhost:8081/ws/derms", new DERMSServer("QUE"));
endpoints[3] = Endpoint.publish("http://localhost:8082/ws/derms", new DERMSServer("SHE"));
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
public static void stop() {
for (Endpoint endpoint : endpoints) {
if (endpoint != null && endpoint.isPublished()) {
endpoint.stop();
System.out.println("DERMS Server is stopped.");
}
}
}
}
|