From d6067d28ce2a22c64cb595af6bca48c81b1664da Mon Sep 17 00:00:00 2001 From: BMatajsz <90217645+BMatajsz@users.noreply.github.com> Date: Tue, 3 Dec 2024 03:30:34 -0500 Subject: Test progress --- .../java/derms/replica1/DERMSServerPublisher.java | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/main/java/derms/replica1/DERMSServerPublisher.java') diff --git a/src/main/java/derms/replica1/DERMSServerPublisher.java b/src/main/java/derms/replica1/DERMSServerPublisher.java index df175b6..9b5ba91 100644 --- a/src/main/java/derms/replica1/DERMSServerPublisher.java +++ b/src/main/java/derms/replica1/DERMSServerPublisher.java @@ -2,15 +2,22 @@ package derms.replica1; import javax.xml.ws.Endpoint; +import derms.frontend.DERMSServerImpl; + public class DERMSServerPublisher { + + private static Endpoint endpoint; + public static void main(String[] args) { - try { - Endpoint.publish("http://localhost:8387/ws/derms", new DERMSServer("MTL")); -// Endpoint.publish("http://localhost:8081/ws/derms", new DERMSServer("QUE")); -// Endpoint.publish("http://localhost:8082/ws/derms", new DERMSServer("SHE")); - } catch (InterruptedException e) { - throw new RuntimeException(e); + // Publish the web service + endpoint = Endpoint.publish("http://127.0.0.1:8387/ws/derms", new DERMSServerImpl()); + System.out.println("DERMS Server is published at http://127.0.0.1:8387/ws/derms"); + } + + public static void stop() { + if (endpoint != null && endpoint.isPublished()) { + endpoint.stop(); + System.out.println("DERMS Server is stopped."); } - System.out.println("DERMS Web Service is published at http://localhost:8387/ws/derms"); } } \ No newline at end of file -- cgit v1.2.3 From 3c63903f60f175f98b83126dca9db83468af7fda Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Tue, 3 Dec 2024 11:07:44 -0500 Subject: replica1: fix typo --- src/main/java/derms/replica1/DERMSServerPublisher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/derms/replica1/DERMSServerPublisher.java') diff --git a/src/main/java/derms/replica1/DERMSServerPublisher.java b/src/main/java/derms/replica1/DERMSServerPublisher.java index 442f844..281c1f1 100644 --- a/src/main/java/derms/replica1/DERMSServerPublisher.java +++ b/src/main/java/derms/replica1/DERMSServerPublisher.java @@ -10,7 +10,7 @@ public class DERMSServerPublisher { 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")); + endpoints[2] = Endpoint.publish("http://localhost:8082/ws/derms", new DERMSServer("SHE")); } catch (InterruptedException e) { throw new RuntimeException(e); } -- cgit v1.2.3 From 92bf77c700873f2a014ad09b50790c2a1032ebd5 Mon Sep 17 00:00:00 2001 From: BMatajsz <90217645+BMatajsz@users.noreply.github.com> Date: Tue, 3 Dec 2024 11:25:43 -0500 Subject: Conflict1 --- src/main/java/derms/replica1/DERMSServerPublisher.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/java/derms/replica1/DERMSServerPublisher.java') diff --git a/src/main/java/derms/replica1/DERMSServerPublisher.java b/src/main/java/derms/replica1/DERMSServerPublisher.java index 281c1f1..917c189 100644 --- a/src/main/java/derms/replica1/DERMSServerPublisher.java +++ b/src/main/java/derms/replica1/DERMSServerPublisher.java @@ -23,5 +23,13 @@ public class DERMSServerPublisher { System.out.println("DERMS Server is stopped."); } } +// try { +// Endpoint.publish("http://localhost:8387/ws/derms", new DERMSServer("MTL")); +// Endpoint.publish("http://localhost:8081/ws/derms", new DERMSServer("QUE")); +// Endpoint.publish("http://localhost:8082/ws/derms", new DERMSServer("SHE")); +// } catch (InterruptedException e) { +// throw new RuntimeException(e); +// } +// System.out.println("DERMS Web Service is published at http://localhost:8387/ws/derms"); } } \ No newline at end of file -- cgit v1.2.3