75 lines
2.9 KiB
Python
75 lines
2.9 KiB
Python
from gnuviechadminCommon.gnuviechadmin_services import *
|
|
from ZSI.ServiceContainer import ServiceSOAPBinding
|
|
import BusinessMethods
|
|
|
|
class gnuviechadmin(ServiceSOAPBinding):
|
|
soapAction = {
|
|
'https://ssl.gnuviech.info/gnuviechadmin/Authenticate': 'soap_Authenticate',
|
|
}
|
|
_wsdl = """<?xml version=\"1.0\" ?>
|
|
<!--
|
|
Webservice description for gnuviechadmin
|
|
(c) 2006 Jan Dittberner <jan@dittberner.info>
|
|
Version: $Id$
|
|
--><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\">
|
|
<xsd:complexType>
|
|
<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>
|
|
</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:portType name=\"gnuviechadmin\">
|
|
<wsdl:operation name=\"Authenticate\">
|
|
<wsdl:input message=\"tns:AuthRequest\"/>
|
|
<wsdl:output message=\"tns:AuthResponse\"/>
|
|
</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: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(BusinessMethods.login(login=args._login, password=args._password))
|
|
|
|
# Return the response
|
|
return response
|