/**
 * InformationProviderLocator.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis WSDL2Java emitter.
 */

package com.agiledeveloper.www.ws;

public class InformationProviderLocator extends org.apache.axis.client.Service implements com.agiledeveloper.www.ws.InformationProvider {

    // Use to get a proxy class for InformationProviderSoap
    private final java.lang.String InformationProviderSoap_address = "http://localhost/Info/InformationProvider.asmx";

    public java.lang.String getInformationProviderSoapAddress() {
        return InformationProviderSoap_address;
    }

    // The WSDD service name defaults to the port name.
    private java.lang.String InformationProviderSoapWSDDServiceName = "InformationProviderSoap";

    public java.lang.String getInformationProviderSoapWSDDServiceName() {
        return InformationProviderSoapWSDDServiceName;
    }

    public void setInformationProviderSoapWSDDServiceName(java.lang.String name) {
        InformationProviderSoapWSDDServiceName = name;
    }

    public com.agiledeveloper.www.ws.InformationProviderSoap getInformationProviderSoap() throws javax.xml.rpc.ServiceException {
       java.net.URL endpoint;
        try {
            endpoint = new java.net.URL(InformationProviderSoap_address);
        }
        catch (java.net.MalformedURLException e) {
            throw new javax.xml.rpc.ServiceException(e);
        }
        return getInformationProviderSoap(endpoint);
    }

    public com.agiledeveloper.www.ws.InformationProviderSoap getInformationProviderSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
        try {
            com.agiledeveloper.www.ws.InformationProviderSoapStub _stub = new com.agiledeveloper.www.ws.InformationProviderSoapStub(portAddress, this);
            _stub.setPortName(getInformationProviderSoapWSDDServiceName());
            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 (com.agiledeveloper.www.ws.InformationProviderSoap.class.isAssignableFrom(serviceEndpointInterface)) {
                com.agiledeveloper.www.ws.InformationProviderSoapStub _stub = new com.agiledeveloper.www.ws.InformationProviderSoapStub(new java.net.URL(InformationProviderSoap_address), this);
                _stub.setPortName(getInformationProviderSoapWSDDServiceName());
                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 ("InformationProviderSoap".equals(inputPortName)) {
            return getInformationProviderSoap();
        }
        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://www.agiledeveloper.com/ws", "InformationProvider");
    }

    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("InformationProviderSoap"));
        }
        return ports.iterator();
    }

}
