// !DO NOT EDIT THIS FILE!
// This source file is generated by Oracle tools
// Contents may be subject to change
// For reporting problems, use the following
// Version = Oracle WebServices (10.1.3.3.0, build 070610.1800.23513)

package xqueryws.proxy.runtime;

import oracle.j2ee.ws.common.encoding.*;
import oracle.j2ee.ws.client.ServiceExceptionImpl;
import oracle.j2ee.ws.common.util.exception.*;
import oracle.j2ee.ws.common.soap.SOAPVersion;
import oracle.j2ee.ws.client.HandlerChainImpl;
import javax.xml.rpc.*;
import javax.xml.rpc.encoding.*;
import javax.xml.rpc.handler.HandlerChain;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.namespace.QName;

public class ORAWSVService_Impl extends oracle.j2ee.ws.client.BasicService implements xqueryws.proxy.ORAWSVService {
    private static final QName serviceName = new QName("http://xmlns.oracle.com/orawsv", "ORAWSVService");
    private static final QName ns1_ORAWSVPort_QNAME = new QName("http://xmlns.oracle.com/orawsv", "ORAWSVPort");
    private static final Class ORAWSVPortType_PortClass = xqueryws.proxy.ORAWSVPortType.class;
    
    public ORAWSVService_Impl() {
        super(serviceName, new QName[] {
                        ns1_ORAWSVPort_QNAME
                    },
            new xqueryws.proxy.runtime.ORAWSVService_SerializerRegistry().getRegistry());
        
    }
    
    public java.rmi.Remote getPort(QName portName, Class serviceDefInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (portName.equals(ns1_ORAWSVPort_QNAME) &&
                serviceDefInterface.equals(ORAWSVPortType_PortClass)) {
                return getORAWSVPort();
            }
        } catch (Exception e) {
            throw new ServiceExceptionImpl(new LocalizableExceptionAdapter(e));
        }
        return super.getPort(portName, serviceDefInterface);
    }
    
    public java.rmi.Remote getPort(Class serviceDefInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (serviceDefInterface.equals(ORAWSVPortType_PortClass)) {
                return getORAWSVPort();
            }
        } catch (Exception e) {
            throw new ServiceExceptionImpl(new LocalizableExceptionAdapter(e));
        }
        return super.getPort(serviceDefInterface);
    }
    
    public xqueryws.proxy.ORAWSVPortType getORAWSVPort() {
        String[] roles = new String[] {};
        HandlerChainImpl handlerChain = new HandlerChainImpl(getHandlerRegistry().getHandlerChain(ns1_ORAWSVPort_QNAME));
        handlerChain.setRoles(roles);
        xqueryws.proxy.runtime.ORAWSVBinding_Stub stub = new xqueryws.proxy.runtime.ORAWSVBinding_Stub(handlerChain);
        try {
            stub._initialize(super.internalTypeRegistry);
        } catch (JAXRPCException e) {
            throw e;
        } catch (Exception e) {
            throw new JAXRPCException(e.getMessage(), e);
        }
        return stub;
    }
}
