/**
 * ZWS_ZMES_PRODORDCONF_ServiceLocator.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package com.foreverwin.mesnac.common.erp;

public class ZWS_ZMES_PRODORDCONF_ServiceLocator extends org.apache.axis.client.Service implements com.foreverwin.mesnac.common.erp.ZWS_ZMES_PRODORDCONF_Service {

    public ZWS_ZMES_PRODORDCONF_ServiceLocator() {
    }


    public ZWS_ZMES_PRODORDCONF_ServiceLocator(org.apache.axis.EngineConfiguration config) {
        super(config);
    }

    public ZWS_ZMES_PRODORDCONF_ServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
        super(wsdlLoc, sName);
    }

    // Use to get a proxy class for ZWS_ZMES_PRODORDCONF
    private java.lang.String ZWS_ZMES_PRODORDCONF_address = "http://srm.mesnac.com:8000/sap/bc/srt/rfc/sap/zws_zmes_prodordconf/900/zws_zmes_prodordconf/zws_zmes_prodordconf";

    public java.lang.String getZWS_ZMES_PRODORDCONFAddress() {
        return ZWS_ZMES_PRODORDCONF_address;
    }

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

    public java.lang.String getZWS_ZMES_PRODORDCONFWSDDServiceName() {
        return ZWS_ZMES_PRODORDCONFWSDDServiceName;
    }

    public void setZWS_ZMES_PRODORDCONFWSDDServiceName(java.lang.String name) {
        ZWS_ZMES_PRODORDCONFWSDDServiceName = name;
    }

    public com.foreverwin.mesnac.common.erp.Zws_zmes_PRODORDCONF getZWS_ZMES_PRODORDCONF() throws javax.xml.rpc.ServiceException {
       java.net.URL endpoint;
        try {
            endpoint = new java.net.URL(ZWS_ZMES_PRODORDCONF_address);
        }
        catch (java.net.MalformedURLException e) {
            throw new javax.xml.rpc.ServiceException(e);
        }
        return getZWS_ZMES_PRODORDCONF(endpoint);
    }

    public com.foreverwin.mesnac.common.erp.Zws_zmes_PRODORDCONF getZWS_ZMES_PRODORDCONF(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
        try {
            com.foreverwin.mesnac.common.erp.ZWS_ZMES_PRODORDCONF_BindingStub _stub = new com.foreverwin.mesnac.common.erp.ZWS_ZMES_PRODORDCONF_BindingStub(portAddress, this);
            _stub.setPortName(getZWS_ZMES_PRODORDCONFWSDDServiceName());
            return _stub;
        }
        catch (org.apache.axis.AxisFault e) {
            return null;
        }
    }

    public void setZWS_ZMES_PRODORDCONFEndpointAddress(java.lang.String address) {
        ZWS_ZMES_PRODORDCONF_address = address;
    }

    /**
     * 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.foreverwin.mesnac.common.erp.Zws_zmes_PRODORDCONF.class.isAssignableFrom(serviceEndpointInterface)) {
                com.foreverwin.mesnac.common.erp.ZWS_ZMES_PRODORDCONF_BindingStub _stub = new com.foreverwin.mesnac.common.erp.ZWS_ZMES_PRODORDCONF_BindingStub(new java.net.URL(ZWS_ZMES_PRODORDCONF_address), this);
                _stub.setPortName(getZWS_ZMES_PRODORDCONFWSDDServiceName());
                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);
        }
        java.lang.String inputPortName = portName.getLocalPart();
        if ("ZWS_ZMES_PRODORDCONF".equals(inputPortName)) {
            return getZWS_ZMES_PRODORDCONF();
        }
        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("urn:sap-com:document:sap:soap:functions:mc-style", "ZWS_ZMES_PRODORDCONF");
    }

    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("urn:sap-com:document:sap:soap:functions:mc-style", "ZWS_ZMES_PRODORDCONF"));
        }
        return ports.iterator();
    }

    /**
    * Set the endpoint address for the specified port name.
    */
    public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
        
if ("ZWS_ZMES_PRODORDCONF".equals(portName)) {
            setZWS_ZMES_PRODORDCONFEndpointAddress(address);
        }
        else 
{ // Unknown Port Name
            throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
        }
    }

    /**
    * Set the endpoint address for the specified port name.
    */
    public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
        setEndpointAddress(portName.getLocalPart(), address);
    }

}
