summaryrefslogtreecommitdiffstats
path: root/src/main/java/derms/client/Client.java
blob: db8d1694efd14ad254291ced8779140ca2845173 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package derms.client;

import derms.frontend.DERMSInterface;
import derms.frontend.DERMSServerImpl;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import java.net.MalformedURLException;
import java.net.URL;

public abstract class Client {
    public static final String namespace = "frontend.derms";
    public static final int port = 8067;
    public static final QName qname = new QName("http://"+namespace+"/", DERMSServerImpl.class.getSimpleName()+"Service");

    protected final DERMSInterface server;

    protected Client(String FEhost) throws MalformedURLException {
        URL url = new URL("http://"+FEhost+":"+port+"/"+DERMSInterface.class.getSimpleName()+"?wsdl");
        this.server = Service.create(url, qname).getPort(DERMSInterface.class);
    }
}