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


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

# Locator
class XMethodsQueryLocator:
    XMethodsQuerySoapPortType_address = "http://www.xmethods.net/interfaces/query"
    def getXMethodsQuerySoapPortTypeAddress(self):
        return XMethodsQueryLocator.XMethodsQuerySoapPortType_address
    def getXMethodsQuerySoapPortType(self, url=None, **kw):
        return XMethodsQuerySoapSOAP(url or XMethodsQueryLocator.XMethodsQuerySoapPortType_address, **kw)

# Methods
class XMethodsQuerySoapSOAP:
    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: getServiceSummariesByPublisher
    def getServiceSummariesByPublisher(self, request):
        if isinstance(request, getServiceSummariesByPublisher0SoapIn) is False:
            raise TypeError, "%s incorrect request type" % (request.__class__)
        kw = {}
        # no input wsaction
        self.binding.Send(None, None, request, soapaction="", encoding="http://schemas.xmlsoap.org/soap/encoding/", **kw)
        # no output wsaction
        response = self.binding.Receive(getServiceSummariesByPublisher0SoapOut.typecode)
        if isinstance(response, getServiceSummariesByPublisher0SoapOut.typecode.pyclass) is False:
            raise TypeError, "%s incorrect response type" % (response.__class__)
        return response

    # op: getAllServiceSummaries
    def getAllServiceSummaries(self, request):
        if isinstance(request, getAllServiceSummaries1SoapIn) is False:
            raise TypeError, "%s incorrect request type" % (request.__class__)
        kw = {}
        # no input wsaction
        self.binding.Send(None, None, request, soapaction="", encoding="http://schemas.xmlsoap.org/soap/encoding/", **kw)
        # no output wsaction
        response = self.binding.Receive(getAllServiceSummaries1SoapOut.typecode)
        if isinstance(response, getAllServiceSummaries1SoapOut.typecode.pyclass) is False:
            raise TypeError, "%s incorrect response type" % (response.__class__)
        return response

    # op: getAllServiceNames
    def getAllServiceNames(self, request):
        if isinstance(request, getAllServiceNames2SoapIn) is False:
            raise TypeError, "%s incorrect request type" % (request.__class__)
        kw = {}
        # no input wsaction
        self.binding.Send(None, None, request, soapaction="", encoding="http://schemas.xmlsoap.org/soap/encoding/", **kw)
        # no output wsaction
        response = self.binding.Receive(getAllServiceNames2SoapOut.typecode)
        if isinstance(response, getAllServiceNames2SoapOut.typecode.pyclass) is False:
            raise TypeError, "%s incorrect response type" % (response.__class__)
        return response

    # op: getServiceNamesByPublisher
    def getServiceNamesByPublisher(self, request):
        if isinstance(request, getServiceNamesByPublisher3SoapIn) is False:
            raise TypeError, "%s incorrect request type" % (request.__class__)
        kw = {}
        # no input wsaction
        self.binding.Send(None, None, request, soapaction="", encoding="http://schemas.xmlsoap.org/soap/encoding/", **kw)
        # no output wsaction
        response = self.binding.Receive(getServiceNamesByPublisher3SoapOut.typecode)
        if isinstance(response, getServiceNamesByPublisher3SoapOut.typecode.pyclass) is False:
            raise TypeError, "%s incorrect response type" % (response.__class__)
        return response

    # op: getServiceDetail
    def getServiceDetail(self, request):
        if isinstance(request, getServiceDetail4SoapIn) is False:
            raise TypeError, "%s incorrect request type" % (request.__class__)
        kw = {}
        # no input wsaction
        self.binding.Send(None, None, request, soapaction="", encoding="http://schemas.xmlsoap.org/soap/encoding/", **kw)
        # no output wsaction
        response = self.binding.Receive(getServiceDetail4SoapOut.typecode)
        if isinstance(response, getServiceDetail4SoapOut.typecode.pyclass) is False:
            raise TypeError, "%s incorrect response type" % (response.__class__)
        return response

class getServiceSummariesByPublisher0SoapIn:
    def __init__(self):
        self._publisherID = None
        return
getServiceSummariesByPublisher0SoapIn.typecode = Struct(pname=("http://www.xmethods.net/interfaces/query","getServiceSummariesByPublisher"), ofwhat=[ZSI.TC.String(pname="publisherID", aname="_publisherID", encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=getServiceSummariesByPublisher0SoapIn, encoded="http://www.xmethods.net/interfaces/query")

class getServiceSummariesByPublisher0SoapOut:
    def __init__(self):
        self._Result = None
        return
getServiceSummariesByPublisher0SoapOut.typecode = Struct(pname=("http://www.xmethods.net/interfaces/query","getServiceSummariesByPublisherResponse"), ofwhat=[ns0.ArrayOfServiceSummary_Def(pname="Result", aname="_Result", encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=getServiceSummariesByPublisher0SoapOut, encoded="http://www.xmethods.net/interfaces/query")

class getAllServiceSummaries1SoapIn:
    def __init__(self):
        return
getAllServiceSummaries1SoapIn.typecode = Struct(pname=("http://www.xmethods.net/interfaces/query","getAllServiceSummaries"), ofwhat=[], pyclass=getAllServiceSummaries1SoapIn, encoded="http://www.xmethods.net/interfaces/query")

class getAllServiceSummaries1SoapOut:
    def __init__(self):
        self._Result = None
        return
getAllServiceSummaries1SoapOut.typecode = Struct(pname=("http://www.xmethods.net/interfaces/query","getAllServiceSummariesResponse"), ofwhat=[ns0.ArrayOfServiceSummary_Def(pname="Result", aname="_Result", encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=getAllServiceSummaries1SoapOut, encoded="http://www.xmethods.net/interfaces/query")

class getAllServiceNames2SoapIn:
    def __init__(self):
        return
getAllServiceNames2SoapIn.typecode = Struct(pname=("http://www.xmethods.net/interfaces/query","getAllServiceNames"), ofwhat=[], pyclass=getAllServiceNames2SoapIn, encoded="http://www.xmethods.net/interfaces/query")

class getAllServiceNames2SoapOut:
    def __init__(self):
        self._Result = None
        return
getAllServiceNames2SoapOut.typecode = Struct(pname=("http://www.xmethods.net/interfaces/query","getAllServiceNamesResponse"), ofwhat=[ns0.ArrayOfIDNamePair_Def(pname="Result", aname="_Result", encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=getAllServiceNames2SoapOut, encoded="http://www.xmethods.net/interfaces/query")

class getServiceNamesByPublisher3SoapIn:
    def __init__(self):
        self._publisherID = None
        return
getServiceNamesByPublisher3SoapIn.typecode = Struct(pname=("http://www.xmethods.net/interfaces/query","getServiceNamesByPublisher"), ofwhat=[ZSI.TC.String(pname="publisherID", aname="_publisherID", encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=getServiceNamesByPublisher3SoapIn, encoded="http://www.xmethods.net/interfaces/query")

class getServiceNamesByPublisher3SoapOut:
    def __init__(self):
        self._Result = None
        return
getServiceNamesByPublisher3SoapOut.typecode = Struct(pname=("http://www.xmethods.net/interfaces/query","getServiceNamesByPublisherResponse"), ofwhat=[ns0.ArrayOfIDNamePair_Def(pname="Result", aname="_Result", encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=getServiceNamesByPublisher3SoapOut, encoded="http://www.xmethods.net/interfaces/query")

class getServiceDetail4SoapIn:
    def __init__(self):
        self._id = None
        return
getServiceDetail4SoapIn.typecode = Struct(pname=("http://www.xmethods.net/interfaces/query","getServiceDetail"), ofwhat=[ZSI.TC.String(pname="id", aname="_id", encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=getServiceDetail4SoapIn, encoded="http://www.xmethods.net/interfaces/query")

class getServiceDetail4SoapOut:
    def __init__(self):
        self._Result = None
        return
getServiceDetail4SoapOut.typecode = Struct(pname=("http://www.xmethods.net/interfaces/query","getServiceDetailResponse"), ofwhat=[ns0.ServiceDetail_Def(pname="Result", aname="_Result", encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=getServiceDetail4SoapOut, encoded="http://www.xmethods.net/interfaces/query")
