- base for WSDL-Webservice
git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@178 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
parent
9692371a57
commit
650c4928c3
6 changed files with 700 additions and 4 deletions
32
backend/src/SOAPServer.py
Normal file
32
backend/src/SOAPServer.py
Normal file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/python
|
||||
#
|
||||
# (c) 2006 Jan Dittberner <jan@dittberner.info>
|
||||
# $Id$
|
||||
#
|
||||
|
||||
from ZSI.ServiceContainer import ServiceContainer
|
||||
from ZSI.dispatch import SOAPRequestHandler
|
||||
from gnuviechadminCommon.gnuviechadmin_services_server import *
|
||||
|
||||
service = gnuviechadmin()
|
||||
|
||||
class mySOAPRequestHandler(SOAPRequestHandler):
|
||||
'''
|
||||
Own SOAP request handler implementation.
|
||||
'''
|
||||
def do_GET(self):
|
||||
'''
|
||||
Process the HTTP GET method, delivers service's WSDL.
|
||||
'''
|
||||
self.send_xml(service._wsdl)
|
||||
|
||||
def AsServer(port=80, services=(), RequestHandlerClass=SOAPRequestHandler):
|
||||
address = ('', port)
|
||||
sc = ServiceContainer(address, RequestHandlerClass=RequestHandlerClass)
|
||||
for service in services:
|
||||
path = service.getPost()
|
||||
sc.setNode(service, path)
|
||||
sc.serve_forever()
|
||||
|
||||
if __name__ == '__main__':
|
||||
AsServer(port=8080, services=[service], RequestHandlerClass=mySOAPRequestHandler)
|
|
@ -64,7 +64,7 @@ Version: $Id$
|
|||
<wsdl:part name="AuthResponse" element="tns:AuthCode" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="AuthRequest">
|
||||
<wsdl:part name="AuthRequest" element="tns:logininfo" />
|
||||
<wsdl:part name="AuthRequest" element="tns:LoginInfo" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="ListDomainsResponse">
|
||||
<wsdl:part name="ListDomainsResponse" element="tns:DomainList" />
|
||||
|
@ -122,6 +122,18 @@ Version: $Id$
|
|||
<soap:body use="literal" parts=" ListDomainsResponse" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="ListMailAliases">
|
||||
<soap:operation
|
||||
soapAction="https://ssl.gnuviech.info/gnuviechadmin/ListMailAliases" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal"
|
||||
parts=" ListMailAliasesRequest" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal"
|
||||
parts=" ListMailAliasesResponse" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="gnuviechadmin">
|
||||
<wsdl:port name="gnuviechadminSOAP"
|
||||
|
|
193
common/src/gnuviechadminCommon/gnuviechadmin_services.py
Normal file
193
common/src/gnuviechadminCommon/gnuviechadmin_services.py
Normal file
|
@ -0,0 +1,193 @@
|
|||
##################################################
|
||||
# gnuviechadmin-common/gnuviechadmin_services.py
|
||||
# generated by ZSI.wsdl2python
|
||||
#
|
||||
#
|
||||
##################################################
|
||||
|
||||
|
||||
from gnuviechadmin_services_types import *
|
||||
from gnuviechadmin_services_types import \
|
||||
https___ssl_gnuviech_info_gnuviechadmin as ns1
|
||||
import urlparse, types
|
||||
from ZSI.TCcompound import Struct
|
||||
from ZSI import client
|
||||
import ZSI
|
||||
|
||||
class gnuviechadminInterface:
|
||||
def getgnuviechadmin(self, portAddress=None, **kw):
|
||||
raise NonImplementationError, "method not implemented"
|
||||
|
||||
|
||||
class gnuviechadminLocator(gnuviechadminInterface):
|
||||
gnuviechadmin_address = "https://ssl.gnuviech.info/gnuviechadmin"
|
||||
def getgnuviechadminAddress(self):
|
||||
return gnuviechadminLocator.gnuviechadmin_address
|
||||
|
||||
def getgnuviechadmin(self, portAddress=None, **kw):
|
||||
return gnuviechadminSOAPSOAP(portAddress or gnuviechadminLocator.gnuviechadmin_address, **kw)
|
||||
|
||||
|
||||
class gnuviechadminSOAPSOAP:
|
||||
|
||||
def __init__(self, addr, **kw):
|
||||
netloc = (urlparse.urlparse(addr)[1]).split(":") + [80,]
|
||||
if not kw.has_key("host"):
|
||||
kw["host"] = netloc[0]
|
||||
if not kw.has_key("port"):
|
||||
kw["port"] = int(netloc[1])
|
||||
if not kw.has_key("url"):
|
||||
kw["url"] = urlparse.urlparse(addr)[2]
|
||||
self.binding = client.Binding(**kw)
|
||||
|
||||
|
||||
def Authenticate(self, request):
|
||||
"""
|
||||
@param: request to AuthRequest::
|
||||
_LoginInfo: ns1.LoginInfo_Def
|
||||
|
||||
@return: response is str
|
||||
"""
|
||||
|
||||
if not isinstance(request, AuthRequest) and\
|
||||
not issubclass(AuthRequest, request.__class__):
|
||||
raise TypeError, "%s incorrect request type" %(request.__class__)
|
||||
kw = {}
|
||||
response = self.binding.Send(None, None, request, soapaction="https://ssl.gnuviech.info/gnuviechadmin/Authenticate", **kw)
|
||||
response = self.binding.Receive(AuthResponseWrapper())
|
||||
|
||||
if not isinstance(response, basestring):
|
||||
raise TypeError, "%s incorrect response type" %(response.__class__)
|
||||
return response
|
||||
|
||||
|
||||
def ListDomains(self, request):
|
||||
"""
|
||||
@param: request is str
|
||||
|
||||
@return: response from ListDomainsResponse::
|
||||
_DomainList: ns1.DomainList_Def
|
||||
"""
|
||||
|
||||
if not isinstance(request, basestring):
|
||||
raise TypeError, "%s incorrect request type" %(request.__class__)
|
||||
kw = {'requestclass': ListDomainsRequestWrapper}
|
||||
response = self.binding.Send(None, None, request, soapaction="https://ssl.gnuviech.info/gnuviechadmin/ListDomains", **kw)
|
||||
response = self.binding.Receive(ListDomainsResponseWrapper())
|
||||
|
||||
if not isinstance(response, ListDomainsResponse) and\
|
||||
not issubclass(ListDomainsResponse, response.__class__):
|
||||
raise TypeError, "%s incorrect response type" %(response.__class__)
|
||||
return response
|
||||
|
||||
|
||||
def ListMailAliases(self, request):
|
||||
"""
|
||||
@param: request to ListMailAliasesRequest::
|
||||
_AuthCode: str
|
||||
_DomainName: str
|
||||
|
||||
@return: response from ListMailAliasesResponse::
|
||||
_ListMailAliasesResponse: ns1.MailAliasList_Def
|
||||
_alias: ns1.MailAlias_Def
|
||||
_alias: str
|
||||
_target: str
|
||||
"""
|
||||
|
||||
if not isinstance(request, ListMailAliasesRequest) and\
|
||||
not issubclass(ListMailAliasesRequest, request.__class__):
|
||||
raise TypeError, "%s incorrect request type" %(request.__class__)
|
||||
kw = {}
|
||||
response = self.binding.Send(None, None, request, soapaction="https://ssl.gnuviech.info/gnuviechadmin/ListMailAliases", **kw)
|
||||
response = self.binding.Receive(ListMailAliasesResponseWrapper())
|
||||
|
||||
if not isinstance(response, ListMailAliasesResponse) and\
|
||||
not issubclass(ListMailAliasesResponse, response.__class__):
|
||||
raise TypeError, "%s incorrect response type" %(response.__class__)
|
||||
return response
|
||||
|
||||
|
||||
|
||||
class AuthRequest(ns1.LoginInfo_Dec):
|
||||
if not hasattr( ns1.LoginInfo_Dec(), "typecode" ):
|
||||
typecode = ns1.LoginInfo_Dec()
|
||||
|
||||
def __init__(self, name=None, ns=None):
|
||||
ns1.LoginInfo_Dec.__init__(self, name=None, ns=None)
|
||||
|
||||
class AuthRequestWrapper(AuthRequest):
|
||||
"""wrapper for document:literal message"""
|
||||
|
||||
typecode = AuthRequest( name=None, ns=None ).typecode
|
||||
def __init__( self, name=None, ns=None, **kw ):
|
||||
AuthRequest.__init__( self, name=None, ns=None )
|
||||
|
||||
class AuthResponse(ns1.AuthCode_Dec):
|
||||
if not hasattr( ns1.AuthCode_Dec(), "typecode" ):
|
||||
typecode = ns1.AuthCode_Dec()
|
||||
|
||||
def __init__(self, name=None, ns=None):
|
||||
ns1.AuthCode_Dec.__init__(self, name=None, ns=None)
|
||||
|
||||
class AuthResponseWrapper(AuthResponse):
|
||||
"""wrapper for document:literal message"""
|
||||
|
||||
typecode = AuthResponse( name=None, ns=None ).typecode
|
||||
def __init__( self, name=None, ns=None, **kw ):
|
||||
AuthResponse.__init__( self, name=None, ns=None )
|
||||
|
||||
class ListDomainsRequest(ns1.AuthCode_Dec):
|
||||
if not hasattr( ns1.AuthCode_Dec(), "typecode" ):
|
||||
typecode = ns1.AuthCode_Dec()
|
||||
|
||||
def __init__(self, name=None, ns=None):
|
||||
ns1.AuthCode_Dec.__init__(self, name=None, ns=None)
|
||||
|
||||
class ListDomainsRequestWrapper(ListDomainsRequest):
|
||||
"""wrapper for document:literal message"""
|
||||
|
||||
typecode = ListDomainsRequest( name=None, ns=None ).typecode
|
||||
def __init__( self, name=None, ns=None, **kw ):
|
||||
ListDomainsRequest.__init__( self, name=None, ns=None )
|
||||
|
||||
class ListDomainsResponse(ns1.DomainList_Dec):
|
||||
if not hasattr( ns1.DomainList_Dec(), "typecode" ):
|
||||
typecode = ns1.DomainList_Dec()
|
||||
|
||||
def __init__(self, name=None, ns=None):
|
||||
ns1.DomainList_Dec.__init__(self, name=None, ns=None)
|
||||
|
||||
class ListDomainsResponseWrapper(ListDomainsResponse):
|
||||
"""wrapper for document:literal message"""
|
||||
|
||||
typecode = ListDomainsResponse( name=None, ns=None ).typecode
|
||||
def __init__( self, name=None, ns=None, **kw ):
|
||||
ListDomainsResponse.__init__( self, name=None, ns=None )
|
||||
|
||||
class ListMailAliasesRequest(ns1.ListMailAliasesRequest_Dec):
|
||||
if not hasattr( ns1.ListMailAliasesRequest_Dec(), "typecode" ):
|
||||
typecode = ns1.ListMailAliasesRequest_Dec()
|
||||
|
||||
def __init__(self, name=None, ns=None):
|
||||
ns1.ListMailAliasesRequest_Dec.__init__(self, name=None, ns=None)
|
||||
|
||||
class ListMailAliasesRequestWrapper(ListMailAliasesRequest):
|
||||
"""wrapper for document:literal message"""
|
||||
|
||||
typecode = ListMailAliasesRequest( name=None, ns=None ).typecode
|
||||
def __init__( self, name=None, ns=None, **kw ):
|
||||
ListMailAliasesRequest.__init__( self, name=None, ns=None )
|
||||
|
||||
class ListMailAliasesResponse(ns1.ListMailAliasesResponse_Dec):
|
||||
if not hasattr( ns1.ListMailAliasesResponse_Dec(), "typecode" ):
|
||||
typecode = ns1.ListMailAliasesResponse_Dec()
|
||||
|
||||
def __init__(self, name=None, ns=None):
|
||||
ns1.ListMailAliasesResponse_Dec.__init__(self, name=None, ns=None)
|
||||
|
||||
class ListMailAliasesResponseWrapper(ListMailAliasesResponse):
|
||||
"""wrapper for document:literal message"""
|
||||
|
||||
typecode = ListMailAliasesResponse( name=None, ns=None ).typecode
|
||||
def __init__( self, name=None, ns=None, **kw ):
|
||||
ListMailAliasesResponse.__init__( self, name=None, ns=None )
|
172
common/src/gnuviechadminCommon/gnuviechadmin_services_server.py
Normal file
172
common/src/gnuviechadminCommon/gnuviechadmin_services_server.py
Normal file
|
@ -0,0 +1,172 @@
|
|||
from gnuviechadmin_services import *
|
||||
from ZSI.ServiceContainer import ServiceSOAPBinding
|
||||
|
||||
class gnuviechadmin(ServiceSOAPBinding):
|
||||
soapAction = {
|
||||
'https://ssl.gnuviech.info/gnuviechadmin/Authenticate': 'soap_Authenticate',
|
||||
'https://ssl.gnuviech.info/gnuviechadmin/ListDomains': 'soap_ListDomains',
|
||||
'https://ssl.gnuviech.info/gnuviechadmin/ListMailAliases': 'soap_ListMailAliases',
|
||||
}
|
||||
_wsdl = """<?xml version=\"1.0\" ?>
|
||||
<!--
|
||||
Webservice description for gnuviechadmin
|
||||
(c) 2006 Jan Dittberner <jan@dittberner.info>
|
||||
Version: $Id: gnuviechadmin.wsdl 862 2006-03-07 15:02:39Z jan $
|
||||
--><wsdl:definitions name=\"gnuviechadmin\" targetNamespace=\"https://ssl.gnuviech.info/gnuviechadmin/\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:tns=\"https://ssl.gnuviech.info/gnuviechadmin/\" xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
|
||||
<wsdl:types>
|
||||
<xsd:schema targetNamespace=\"https://ssl.gnuviech.info/gnuviechadmin/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
|
||||
<xsd:element name=\"AuthCode\" type=\"xsd:string\"/>
|
||||
<xsd:element name=\"LoginInfo\" type=\"tns:LoginInfo\"/>
|
||||
<xsd:complexType name=\"LoginInfo\">
|
||||
<xsd:sequence maxOccurs=\"1\" minOccurs=\"1\">
|
||||
<xsd:element name=\"login\" type=\"xsd:string\"/>
|
||||
<xsd:element name=\"password\" type=\"xsd:string\"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name=\"DomainList\" type=\"tns:DomainList\"/>
|
||||
<xsd:complexType name=\"DomainList\">
|
||||
<xsd:sequence maxOccurs=\"unbounded\" minOccurs=\"0\">
|
||||
<xsd:element name=\"domain\" type=\"tns:Domain\"/>
|
||||
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name=\"ListMailAliasesResponse\" type=\"tns:MailAliasList\"/>
|
||||
<xsd:element name=\"ListMailAliasesRequest\">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence maxOccurs=\"1\" minOccurs=\"1\">
|
||||
<xsd:element name=\"AuthCode\" type=\"xsd:string\"/>
|
||||
<xsd:element name=\"DomainName\" type=\"xsd:string\"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:complexType name=\"Domain\">
|
||||
<xsd:sequence maxOccurs=\"1\" minOccurs=\"1\">
|
||||
<xsd:element name=\"domainName\" type=\"xsd:string\"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name=\"MailAlias\">
|
||||
<xsd:sequence maxOccurs=\"1\" minOccurs=\"1\">
|
||||
<xsd:element name=\"alias\" type=\"xsd:string\"/>
|
||||
<xsd:element name=\"target\" type=\"xsd:string\"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name=\"MailAliasList\">
|
||||
<xsd:sequence maxOccurs=\"unbounded\" minOccurs=\"0\">
|
||||
<xsd:element name=\"alias\" type=\"tns:MailAlias\"/>
|
||||
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
</xsd:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name=\"AuthResponse\">
|
||||
<wsdl:part element=\"tns:AuthCode\" name=\"AuthResponse\"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name=\"AuthRequest\">
|
||||
<wsdl:part element=\"tns:LoginInfo\" name=\"AuthRequest\"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name=\"ListDomainsResponse\">
|
||||
<wsdl:part element=\"tns:DomainList\" name=\"ListDomainsResponse\"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name=\"ListDomainsRequest\">
|
||||
<wsdl:part element=\"tns:AuthCode\" name=\"ListDomainsRequest\"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name=\"ListMailAliasesResponse\">
|
||||
<wsdl:part element=\"tns:ListMailAliasesResponse\" name=\"ListMailAliasesResponse\"/>
|
||||
|
||||
</wsdl:message>
|
||||
<wsdl:message name=\"ListMailAliasesRequest\">
|
||||
<wsdl:part element=\"tns:ListMailAliasesRequest\" name=\"ListMailAliasesRequest\"/>
|
||||
|
||||
</wsdl:message>
|
||||
<wsdl:portType name=\"gnuviechadmin\">
|
||||
<wsdl:operation name=\"Authenticate\">
|
||||
<wsdl:input message=\"tns:AuthRequest\"/>
|
||||
<wsdl:output message=\"tns:AuthResponse\"/>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name=\"ListDomains\">
|
||||
<wsdl:input message=\"tns:ListDomainsRequest\"/>
|
||||
<wsdl:output message=\"tns:ListDomainsResponse\"/>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name=\"ListMailAliases\">
|
||||
<wsdl:input message=\"tns:ListMailAliasesRequest\"/>
|
||||
<wsdl:output message=\"tns:ListMailAliasesResponse\"/>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name=\"gnuviechadminSOAP\" type=\"tns:gnuviechadmin\">
|
||||
<soap:binding style=\"document\" transport=\"http://schemas.xmlsoap.org/soap/http\"/>
|
||||
<wsdl:operation name=\"Authenticate\">
|
||||
|
||||
<soap:operation soapAction=\"https://ssl.gnuviech.info/gnuviechadmin/Authenticate\"/>
|
||||
<wsdl:input>
|
||||
|
||||
<soap:body parts=\" AuthRequest\" use=\"literal\"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
|
||||
<soap:body parts=\" AuthResponse\" use=\"literal\"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name=\"ListDomains\">
|
||||
<soap:operation soapAction=\"https://ssl.gnuviech.info/gnuviechadmin/ListDomains\"/>
|
||||
<wsdl:input>
|
||||
<soap:body parts=\" ListDomainsRequest\" use=\"literal\"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body parts=\" ListDomainsResponse\" use=\"literal\"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name=\"ListMailAliases\">
|
||||
<soap:operation soapAction=\"https://ssl.gnuviech.info/gnuviechadmin/ListMailAliases\"/>
|
||||
<wsdl:input>
|
||||
<soap:body parts=\" ListMailAliasesRequest\" use=\"literal\"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body parts=\" ListMailAliasesResponse\" use=\"literal\"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name=\"gnuviechadmin\">
|
||||
<wsdl:port binding=\"tns:gnuviechadminSOAP\" name=\"gnuviechadminSOAP\">
|
||||
<soap:address location=\"https://ssl.gnuviech.info/gnuviechadmin\"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>"""
|
||||
|
||||
def __init__(self, post='/gnuviechadmin', **kw):
|
||||
ServiceSOAPBinding.__init__(self, post)
|
||||
|
||||
|
||||
def soap_Authenticate(self, ps):
|
||||
# input vals in request object
|
||||
args = ps.Parse( AuthRequestWrapper )
|
||||
|
||||
# assign return values to response object
|
||||
class SimpleTypeWrapper(str): typecode = AuthResponseWrapper()
|
||||
|
||||
# WARNING specify value eg. SimpleTypeWrapper(1)
|
||||
response = SimpleTypeWrapper()
|
||||
|
||||
# Return the response
|
||||
return response
|
||||
|
||||
def soap_ListDomains(self, ps):
|
||||
# input vals in request object
|
||||
args = ps.Parse( ListDomainsRequestWrapper )
|
||||
|
||||
# assign return values to response object
|
||||
response = ListDomainsResponseWrapper()
|
||||
|
||||
# Return the response
|
||||
return response
|
||||
|
||||
def soap_ListMailAliases(self, ps):
|
||||
# input vals in request object
|
||||
args = ps.Parse( ListMailAliasesRequestWrapper )
|
||||
|
||||
# assign return values to response object
|
||||
response = ListMailAliasesResponseWrapper()
|
||||
|
||||
# Return the response
|
||||
return response
|
287
common/src/gnuviechadminCommon/gnuviechadmin_services_types.py
Normal file
287
common/src/gnuviechadminCommon/gnuviechadmin_services_types.py
Normal file
|
@ -0,0 +1,287 @@
|
|||
##################################################
|
||||
# gnuviechadmin-common/gnuviechadmin_services_types.py
|
||||
# generated by ZSI.wsdl2python
|
||||
#
|
||||
#
|
||||
##################################################
|
||||
|
||||
|
||||
import ZSI
|
||||
from ZSI.TCcompound import Struct
|
||||
|
||||
##############################
|
||||
# targetNamespace
|
||||
#
|
||||
# https://ssl.gnuviech.info/gnuviechadmin/
|
||||
##############################
|
||||
|
||||
|
||||
# imported as: ns1
|
||||
class https___ssl_gnuviech_info_gnuviechadmin:
|
||||
targetNamespace = 'https://ssl.gnuviech.info/gnuviechadmin/'
|
||||
|
||||
class Domain_Def(ZSI.TCcompound.Struct):
|
||||
schema = 'https://ssl.gnuviech.info/gnuviechadmin/'
|
||||
type = 'Domain'
|
||||
|
||||
def __init__(self, name=None, ns=None, **kw):
|
||||
# internal vars
|
||||
self._domainName = None
|
||||
|
||||
TClist = [ZSI.TC.String(pname="domainName",aname="_domainName"), ]
|
||||
|
||||
oname = name
|
||||
|
||||
if name:
|
||||
aname = '_%s' % name
|
||||
if ns:
|
||||
oname += ' xmlns="%s"' % ns
|
||||
else:
|
||||
oname += ' xmlns="%s"' % self.__class__.schema
|
||||
else:
|
||||
aname = None
|
||||
|
||||
ZSI.TCcompound.Struct.__init__(self, self.__class__, TClist,
|
||||
pname=name, inorder=0,
|
||||
aname=aname, oname=oname,
|
||||
**kw)
|
||||
def Get_domainName(self):
|
||||
return self._domainName
|
||||
|
||||
def Set_domainName(self,_domainName):
|
||||
self._domainName = _domainName
|
||||
|
||||
|
||||
class LoginInfo_Def(ZSI.TCcompound.Struct):
|
||||
schema = 'https://ssl.gnuviech.info/gnuviechadmin/'
|
||||
type = 'LoginInfo'
|
||||
|
||||
def __init__(self, name=None, ns=None, **kw):
|
||||
# internal vars
|
||||
self._login = None
|
||||
self._password = None
|
||||
|
||||
TClist = [ZSI.TC.String(pname="login",aname="_login"), ZSI.TC.String(pname="password",aname="_password"), ]
|
||||
|
||||
oname = name
|
||||
|
||||
if name:
|
||||
aname = '_%s' % name
|
||||
if ns:
|
||||
oname += ' xmlns="%s"' % ns
|
||||
else:
|
||||
oname += ' xmlns="%s"' % self.__class__.schema
|
||||
else:
|
||||
aname = None
|
||||
|
||||
ZSI.TCcompound.Struct.__init__(self, self.__class__, TClist,
|
||||
pname=name, inorder=0,
|
||||
aname=aname, oname=oname,
|
||||
**kw)
|
||||
def Get_login(self):
|
||||
return self._login
|
||||
|
||||
def Set_login(self,_login):
|
||||
self._login = _login
|
||||
|
||||
def Get_password(self):
|
||||
return self._password
|
||||
|
||||
def Set_password(self,_password):
|
||||
self._password = _password
|
||||
|
||||
|
||||
class MailAlias_Def(ZSI.TCcompound.Struct):
|
||||
schema = 'https://ssl.gnuviech.info/gnuviechadmin/'
|
||||
type = 'MailAlias'
|
||||
|
||||
def __init__(self, name=None, ns=None, **kw):
|
||||
# internal vars
|
||||
self._alias = None
|
||||
self._target = None
|
||||
|
||||
TClist = [ZSI.TC.String(pname="alias",aname="_alias"), ZSI.TC.String(pname="target",aname="_target"), ]
|
||||
|
||||
oname = name
|
||||
|
||||
if name:
|
||||
aname = '_%s' % name
|
||||
if ns:
|
||||
oname += ' xmlns="%s"' % ns
|
||||
else:
|
||||
oname += ' xmlns="%s"' % self.__class__.schema
|
||||
else:
|
||||
aname = None
|
||||
|
||||
ZSI.TCcompound.Struct.__init__(self, self.__class__, TClist,
|
||||
pname=name, inorder=0,
|
||||
aname=aname, oname=oname,
|
||||
**kw)
|
||||
def Get_alias(self):
|
||||
return self._alias
|
||||
|
||||
def Set_alias(self,_alias):
|
||||
self._alias = _alias
|
||||
|
||||
def Get_target(self):
|
||||
return self._target
|
||||
|
||||
def Set_target(self,_target):
|
||||
self._target = _target
|
||||
|
||||
|
||||
class ListMailAliasesRequest_Dec(ZSI.TCcompound.Struct):
|
||||
schema = 'https://ssl.gnuviech.info/gnuviechadmin/'
|
||||
literal = 'ListMailAliasesRequest'
|
||||
|
||||
def __init__(self, name=None, ns=None, **kw):
|
||||
name = name or self.__class__.literal
|
||||
ns = ns or self.__class__.schema
|
||||
|
||||
# internal vars
|
||||
self._AuthCode = None
|
||||
self._DomainName = None
|
||||
|
||||
TClist = [ZSI.TC.String(pname="AuthCode",aname="_AuthCode"), ZSI.TC.String(pname="DomainName",aname="_DomainName"), ]
|
||||
|
||||
oname = name
|
||||
|
||||
if name:
|
||||
aname = '_%s' % name
|
||||
if ns:
|
||||
oname += ' xmlns="%s"' % ns
|
||||
else:
|
||||
oname += ' xmlns="%s"' % self.__class__.schema
|
||||
else:
|
||||
aname = None
|
||||
|
||||
ZSI.TCcompound.Struct.__init__(self, self.__class__, TClist,
|
||||
pname=name, inorder=0,
|
||||
aname=aname, oname=oname,
|
||||
**kw)
|
||||
def Get_AuthCode(self):
|
||||
return self._AuthCode
|
||||
|
||||
def Set_AuthCode(self,_AuthCode):
|
||||
self._AuthCode = _AuthCode
|
||||
|
||||
def Get_DomainName(self):
|
||||
return self._DomainName
|
||||
|
||||
def Set_DomainName(self,_DomainName):
|
||||
self._DomainName = _DomainName
|
||||
|
||||
|
||||
class DomainList_Def(ZSI.TCcompound.Struct):
|
||||
schema = 'https://ssl.gnuviech.info/gnuviechadmin/'
|
||||
type = 'DomainList'
|
||||
|
||||
def __init__(self, name=None, ns=None, **kw):
|
||||
# internal vars
|
||||
self._domain = None
|
||||
|
||||
TClist = [ns1.Domain_Def(name="domain", ns=ns), ]
|
||||
|
||||
oname = name
|
||||
|
||||
if name:
|
||||
aname = '_%s' % name
|
||||
if ns:
|
||||
oname += ' xmlns="%s"' % ns
|
||||
else:
|
||||
oname += ' xmlns="%s"' % self.__class__.schema
|
||||
else:
|
||||
aname = None
|
||||
|
||||
ZSI.TCcompound.Struct.__init__(self, self.__class__, TClist,
|
||||
pname=name, inorder=0,
|
||||
aname=aname, oname=oname,
|
||||
**kw)
|
||||
def Get_domain(self):
|
||||
return self._domain
|
||||
|
||||
def Set_domain(self,_domain):
|
||||
self._domain = _domain
|
||||
|
||||
|
||||
class LoginInfo_Dec(LoginInfo_Def):
|
||||
literal = "LoginInfo"
|
||||
schema = "https://ssl.gnuviech.info/gnuviechadmin/"
|
||||
|
||||
def __init__(self, name=None, ns=None, **kw):
|
||||
name = name or self.__class__.literal
|
||||
ns = ns or self.__class__.schema
|
||||
|
||||
ns1.LoginInfo_Def.__init__(self, name=name, ns=ns, **kw)
|
||||
self.typecode = ns1.LoginInfo_Def(name=name, ns=ns, **kw)
|
||||
|
||||
class MailAliasList_Def(ZSI.TCcompound.Struct):
|
||||
schema = 'https://ssl.gnuviech.info/gnuviechadmin/'
|
||||
type = 'MailAliasList'
|
||||
|
||||
def __init__(self, name=None, ns=None, **kw):
|
||||
# internal vars
|
||||
self._alias = None
|
||||
|
||||
TClist = [ns1.MailAlias_Def(name="alias", ns=ns), ]
|
||||
|
||||
oname = name
|
||||
|
||||
if name:
|
||||
aname = '_%s' % name
|
||||
if ns:
|
||||
oname += ' xmlns="%s"' % ns
|
||||
else:
|
||||
oname += ' xmlns="%s"' % self.__class__.schema
|
||||
else:
|
||||
aname = None
|
||||
|
||||
ZSI.TCcompound.Struct.__init__(self, self.__class__, TClist,
|
||||
pname=name, inorder=0,
|
||||
aname=aname, oname=oname,
|
||||
**kw)
|
||||
def Get_alias(self):
|
||||
return self._alias
|
||||
|
||||
def Set_alias(self,_alias):
|
||||
self._alias = _alias
|
||||
|
||||
|
||||
class DomainList_Dec(DomainList_Def):
|
||||
literal = "DomainList"
|
||||
schema = "https://ssl.gnuviech.info/gnuviechadmin/"
|
||||
|
||||
def __init__(self, name=None, ns=None, **kw):
|
||||
name = name or self.__class__.literal
|
||||
ns = ns or self.__class__.schema
|
||||
|
||||
ns1.DomainList_Def.__init__(self, name=name, ns=ns, **kw)
|
||||
self.typecode = ns1.DomainList_Def(name=name, ns=ns, **kw)
|
||||
|
||||
class ListMailAliasesResponse_Dec(MailAliasList_Def):
|
||||
literal = "ListMailAliasesResponse"
|
||||
schema = "https://ssl.gnuviech.info/gnuviechadmin/"
|
||||
|
||||
def __init__(self, name=None, ns=None, **kw):
|
||||
name = name or self.__class__.literal
|
||||
ns = ns or self.__class__.schema
|
||||
|
||||
ns1.MailAliasList_Def.__init__(self, name=name, ns=ns, **kw)
|
||||
self.typecode = ns1.MailAliasList_Def(name=name, ns=ns, **kw)
|
||||
|
||||
class AuthCode_Dec(ZSI.TC.String):
|
||||
literal = "AuthCode"
|
||||
schema = "https://ssl.gnuviech.info/gnuviechadmin/"
|
||||
|
||||
def __init__(self, name=None, ns=None, **kw):
|
||||
name = name or self.__class__.literal
|
||||
ns = ns or self.__class__.schema
|
||||
kw["oname"] = '%s xmlns="%s"' %(name, ns)
|
||||
|
||||
ZSI.TC.String.__init__(self,pname=name, aname="%s" % name, **kw)
|
||||
|
||||
# define class alias for subsequent ns classes
|
||||
ns1 = https___ssl_gnuviech_info_gnuviechadmin
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue