Ikke sådan lige umiddelbart
NavnServiceLocator ser i princippet således ud
package dk.hokus.NAVN;
public class NAVNServiceLocator extends org.apache.axis.client.Service implements dk.hokus.NAVN.NAVNService {
// Use to get a proxy class for NAVNPort
private final java.lang.String NAVNPort_address = "
http://URL:PORT/NAVN/webservice"; public java.lang.String getNAVNPortAddress() {
return NAVNPort_address;
}
// The WSDD service name defaults to the port name.
private java.lang.String NAVNPortWSDDServiceName = "NAVNPort";
public java.lang.String getNAVNPortWSDDServiceName() {
return NAVNPortWSDDServiceName;
}
public void setNAVNPortWSDDServiceName(java.lang.String name) {
NAVNPortWSDDServiceName = name;
}
public dk.hokus.NAVN.NAVN getNAVNPort() throws javax.xml.rpc.ServiceException {
java.net.URL endpoint;
try {
endpoint = new java.net.URL(NAVNPort_address);
}
catch (java.net.MalformedURLException e) {
throw new javax.xml.rpc.ServiceException(e);
}
return getNAVNPort(endpoint);
}
public dk.hokus.NAVN.NAVN getNAVNPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
try {
dk.hokus.NAVN.NAVNPortBindingStub _stub = new dk.hokus.NAVN.NAVNPortBindingStub(portAddress, this);
_stub.setPortName(getNAVNPortWSDDServiceName());
return _stub;
}
catch (org.apache.axis.AxisFault e) {
return null;
}
}
/**
* For the given interface, get the stub implementation.
* If this service has no port for the given interface,
* then ServiceException is thrown.
*/
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
try {
if (dk.hokus.NAVN.NAVN.class.isAssignableFrom(serviceEndpointInterface)) {
dk.hokus.NAVN.NAVNPortBindingStub _stub = new dk.hokus.NAVN.NAVNPortBindingStub(new java.net.URL(NAVNPort_address), this);
_stub.setPortName(getNAVNPortWSDDServiceName());
return _stub;
}
}
catch (java.lang.Throwable t) {
throw new javax.xml.rpc.ServiceException(t);
}
throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
}
/**
* For the given interface, get the stub implementation.
* If this service has no port for the given interface,
* then ServiceException is thrown.
*/
public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
if (portName == null) {
return getPort(serviceEndpointInterface);
}
String inputPortName = portName.getLocalPart();
if ("NAVNPort".equals(inputPortName)) {
return getNAVNPort();
}
else {
java.rmi.Remote _stub = getPort(serviceEndpointInterface);
((org.apache.axis.client.Stub) _stub).setPortName(portName);
return _stub;
}
}
public javax.xml.namespace.QName getServiceName() {
return new javax.xml.namespace.QName("
http://hokus.dk/NAVN", "NAVNService");
}
private java.util.HashSet ports = null;
public java.util.Iterator getPorts() {
if (ports == null) {
ports = new java.util.HashSet();
ports.add(new javax.xml.namespace.QName("NAVNPort"));
}
return ports.iterator();
}
}