################################################## 
# ZipCodeResolver_services.py 
# generated by ZSI.generate.wsdl2python
##################################################


from ZipCodeResolver_services_types import *
import urlparse, types
from ZSI.TCcompound import ComplexType, Struct
from ZSI import client
import ZSI

# Locator
class ZipCodeResolverLocator:
    ZipCodeResolverSoap_address = "http://webservices.eraserver.net/zipcoderesolver/zipcoderesolver.asmx"
    def getZipCodeResolverSoapAddress(self):
        return ZipCodeResolverLocator.ZipCodeResolverSoap_address
    def getZipCodeResolverSoap(self, url=None, **kw):
        return ZipCodeResolverSoapSOAP(url or ZipCodeResolverLocator.ZipCodeResolverSoap_address, **kw)

# Methods
class ZipCodeResolverSoapSOAP:
    def __init__(self, url, **kw):
        kw.setdefault("readerclass", None)
        kw.setdefault("writerclass", None)
        # no resource properties
        self.binding = client.Binding(url=url, **kw)
        # no ws-addressing

    # op: FullZipCode
    def FullZipCode(self, request):
        if isinstance(request, FullZipCodeSoapIn) is False:
            raise TypeError, "%s incorrect request type" % (request.__class__)
        kw = {}
        # no input wsaction
        self.binding.Send(None, None, request, soapaction="http://webservices.eraserver.net/FullZipCode", **kw)
        # no output wsaction
        response = self.binding.Receive(FullZipCodeSoapOut.typecode)
        if isinstance(response, FullZipCodeSoapOut.typecode.pyclass) is False:
            raise TypeError, "%s incorrect response type" % (response.__class__)
        return response

    # op: ShortZipCode
    def ShortZipCode(self, request):
        if isinstance(request, ShortZipCodeSoapIn) is False:
            raise TypeError, "%s incorrect request type" % (request.__class__)
        kw = {}
        # no input wsaction
        self.binding.Send(None, None, request, soapaction="http://webservices.eraserver.net/ShortZipCode", **kw)
        # no output wsaction
        response = self.binding.Receive(ShortZipCodeSoapOut.typecode)
        if isinstance(response, ShortZipCodeSoapOut.typecode.pyclass) is False:
            raise TypeError, "%s incorrect response type" % (response.__class__)
        return response

    # op: CorrectedAddressHtml
    def CorrectedAddressHtml(self, request):
        if isinstance(request, CorrectedAddressHtmlSoapIn) is False:
            raise TypeError, "%s incorrect request type" % (request.__class__)
        kw = {}
        # no input wsaction
        self.binding.Send(None, None, request, soapaction="http://webservices.eraserver.net/CorrectedAddressHtml", **kw)
        # no output wsaction
        response = self.binding.Receive(CorrectedAddressHtmlSoapOut.typecode)
        if isinstance(response, CorrectedAddressHtmlSoapOut.typecode.pyclass) is False:
            raise TypeError, "%s incorrect response type" % (response.__class__)
        return response

    # op: CorrectedAddressXml
    def CorrectedAddressXml(self, request):
        if isinstance(request, CorrectedAddressXmlSoapIn) is False:
            raise TypeError, "%s incorrect request type" % (request.__class__)
        kw = {}
        # no input wsaction
        self.binding.Send(None, None, request, soapaction="http://webservices.eraserver.net/CorrectedAddressXml", **kw)
        # no output wsaction
        response = self.binding.Receive(CorrectedAddressXmlSoapOut.typecode)
        if isinstance(response, CorrectedAddressXmlSoapOut.typecode.pyclass) is False:
            raise TypeError, "%s incorrect response type" % (response.__class__)
        return response

    # op: VersionInfo
    def VersionInfo(self, request):
        if isinstance(request, VersionInfoSoapIn) is False:
            raise TypeError, "%s incorrect request type" % (request.__class__)
        kw = {}
        # no input wsaction
        self.binding.Send(None, None, request, soapaction="http://webservices.eraserver.net/VersionInfo", **kw)
        # no output wsaction
        response = self.binding.Receive(VersionInfoSoapOut.typecode)
        if isinstance(response, VersionInfoSoapOut.typecode.pyclass) is False:
            raise TypeError, "%s incorrect response type" % (response.__class__)
        return response

FullZipCodeSoapIn = ns1.FullZipCode_Dec().pyclass

FullZipCodeSoapOut = ns1.FullZipCodeResponse_Dec().pyclass

ShortZipCodeSoapIn = ns1.ShortZipCode_Dec().pyclass

ShortZipCodeSoapOut = ns1.ShortZipCodeResponse_Dec().pyclass

CorrectedAddressHtmlSoapIn = ns1.CorrectedAddressHtml_Dec().pyclass

CorrectedAddressHtmlSoapOut = ns1.CorrectedAddressHtmlResponse_Dec().pyclass

CorrectedAddressXmlSoapIn = ns1.CorrectedAddressXml_Dec().pyclass

CorrectedAddressXmlSoapOut = ns1.CorrectedAddressXmlResponse_Dec().pyclass

VersionInfoSoapIn = ns1.VersionInfo_Dec().pyclass

VersionInfoSoapOut = ns1.VersionInfoResponse_Dec().pyclass
