##################################################
# file: PyVision_server.py
#
# skeleton generated by "ZSI.generate.wsdl2dispatch.ServiceModuleWriter"
#      /usr/bin/wsdl2py ./wsdl/binding.wsdl
#
##################################################

from ZSI.schema import GED, GTD
from ZSI.TCcompound import ComplexType, Struct
from PyVision_types import *
from ZSI.ServiceContainer import ServiceSOAPBinding

# Messages  
class EchoRequest:
    def __init__(self, **kw):
        """Keyword parameters:
        Message -- part Message
        """
        self._Message =  kw.get("Message")
EchoRequest.typecode = Struct(pname=("urn:PyVision","echo"), ofwhat=[ZSI.TC.String(pname="Message", aname="_Message", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=EchoRequest, encoded="urn:PyVision")

class EchoResponse:
    def __init__(self, **kw):
        """Keyword parameters:
        Message -- part Message
        """
        self._Message =  kw.get("Message")
EchoResponse.typecode = Struct(pname=("urn:PyVision","echoResponse"), ofwhat=[ZSI.TC.String(pname="Message", aname="_Message", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=EchoResponse, encoded="urn:PyVision")

class AddRequest:
    def __init__(self, **kw):
        """Keyword parameters:
        One -- part One
        Two -- part Two
        """
        self._One =  kw.get("One")
        self._Two =  kw.get("Two")
AddRequest.typecode = Struct(pname=("urn:PyVision","add"), ofwhat=[ZSI.TC.AnyType(pname="One", aname="_One", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True), ZSI.TC.AnyType(pname="Two", aname="_Two", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=AddRequest, encoded="urn:PyVision")

class AddResponse:
    def __init__(self, **kw):
        """Keyword parameters:
        Result -- part Result
        """
        self._Result =  kw.get("Result")
AddResponse.typecode = Struct(pname=("urn:PyVision","addResponse"), ofwhat=[ZSI.TC.AnyType(pname="Result", aname="_Result", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=AddResponse, encoded="urn:PyVision")

class SendRequest:
    def __init__(self, **kw):
        """Keyword parameters:
        Date -- part Date
        Sender -- part Sender
        Reference -- part Reference
        Host -- part Host
        Message -- part Message
        Priority -- part Priority
        """
        self._Date =  kw.get("Date")
        self._Sender =  kw.get("Sender")
        self._Reference =  kw.get("Reference")
        self._Host =  kw.get("Host")
        self._Message =  kw.get("Message")
        self._Priority =  kw.get("Priority")
SendRequest.typecode = Struct(pname=("urn:PyVision","send"), ofwhat=[ZSI.TC.String(pname="Date", aname="_Date", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True), ZSI.TC.String(pname="Sender", aname="_Sender", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True), ZSI.TC.String(pname="Reference", aname="_Reference", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True), ZSI.TC.String(pname="Host", aname="_Host", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True), ZSI.TC.String(pname="Message", aname="_Message", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True), ZSI.TC.AnyType(pname="Priority", aname="_Priority", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=SendRequest, encoded="urn:PyVision")

class SendResponse:
    def __init__(self, **kw):
        """Keyword parameters:
        Message -- part Message
        """
        self._Message =  kw.get("Message")
SendResponse.typecode = Struct(pname=("urn:PyVision","sendResponse"), ofwhat=[ZSI.TC.String(pname="Message", aname="_Message", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=SendResponse, encoded="urn:PyVision")

class GetAlertsRequest:
    def __init__(self, **kw):
        """Keyword parameters:
        Message -- part Message
        """
        self._Message =  kw.get("Message")
GetAlertsRequest.typecode = Struct(pname=("urn:PyVision","getalerts"), ofwhat=[ZSI.TC.String(pname="Message", aname="_Message", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=GetAlertsRequest, encoded="urn:PyVision")

class GetAlertsResponse:
    def __init__(self, **kw):
        """Keyword parameters:
        Message -- part Message
        """
        self._Message =  kw.get("Message")
GetAlertsResponse.typecode = Struct(pname=("urn:PyVision","getalertsResponse"), ofwhat=[ZSI.TC.String(pname="Message", aname="_Message", typed=False, encoded=None, minOccurs=1, maxOccurs=1, nillable=True)], pyclass=GetAlertsResponse, encoded="urn:PyVision")


# Service Skeletons
class PyVisionService(ServiceSOAPBinding):
    soapAction = {}
    root = {}

    def __init__(self, post='/pyvision.py', **kw):
        ServiceSOAPBinding.__init__(self, post)

    def soap_echo(self, ps, **kw):
        request = ps.Parse(EchoRequest.typecode)
        return request,EchoResponse()

    soapAction['urn:PyVision#echo'] = 'soap_echo'
    root[(EchoRequest.typecode.nspname,EchoRequest.typecode.pname)] = 'soap_echo'

    def soap_add(self, ps, **kw):
        request = ps.Parse(AddRequest.typecode)
        return request,AddResponse()

    soapAction['urn:PyVision#add'] = 'soap_add'
    root[(AddRequest.typecode.nspname,AddRequest.typecode.pname)] = 'soap_add'

    def soap_send(self, ps, **kw):
        request = ps.Parse(SendRequest.typecode)
        return request,SendResponse()

    soapAction['urn:PyVision#send'] = 'soap_send'
    root[(SendRequest.typecode.nspname,SendRequest.typecode.pname)] = 'soap_send'

    def soap_getalerts(self, ps, **kw):
        request = ps.Parse(GetAlertsRequest.typecode)
        return request,GetAlertsResponse()

    soapAction['urn:PyVision#getalerts'] = 'soap_getalerts'
    root[(GetAlertsRequest.typecode.nspname,GetAlertsRequest.typecode.pname)] = 'soap_getalerts'

