From c001e711d390de43b86554a9e21780b154fe813e Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Mon, 25 Nov 2024 09:32:37 -0500 Subject: replica1: remove old JAX code --- src/main/java/derms/replica/replica1/Client.java | 30 ------------------------ 1 file changed, 30 deletions(-) delete mode 100644 src/main/java/derms/replica/replica1/Client.java (limited to 'src/main/java/derms/replica/replica1/Client.java') diff --git a/src/main/java/derms/replica/replica1/Client.java b/src/main/java/derms/replica/replica1/Client.java deleted file mode 100644 index 7ebbb68..0000000 --- a/src/main/java/derms/replica/replica1/Client.java +++ /dev/null @@ -1,30 +0,0 @@ -package derms.replica.replica1; - -import javax.xml.namespace.QName; -import javax.xml.ws.Service; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.UnknownHostException; - -public abstract class Client { - public static final String namespace = "derms.samanthony.xyz"; - public static final int port = 8080; - - private final Class endpointInterface; - private final QName qname; - - protected Client(Class endpointInterface, Class endpointClass) { - this.endpointInterface = endpointInterface; - this.qname = new QName("http://"+namespace+"/", endpointClass.getSimpleName()+"Service"); - } - - protected I connect(String host) throws MalformedURLException { - URL url = new URL("http://"+host+":"+port+"/"+endpointInterface.getSimpleName()+"?wsdl"); - return Service.create(url, qname).getPort(endpointInterface); - } - - protected I connect(City city) throws UnknownHostException, MalformedURLException { - String host = Hosts.get(city); - return connect(host); - } -} -- cgit v1.2.3