1
0
Fork 0

- removed old code

git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@188 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
Jan Dittberner 2006-04-18 13:03:38 +00:00
parent daeb7b675e
commit 72bf33dbed
7 changed files with 0 additions and 257 deletions

View file

@ -1,4 +0,0 @@
from SOAPpy import SOAPProxy
server = SOAPProxy("http://localhost:8080/")
print server.hello()

View file

@ -1,8 +0,0 @@
from SOAPpy import SOAPServer
def hello():
return "Hello World"
server = SOAPServer(("localhost", 8080))
server.registerFunction(hello)
server.serve_forever()

View file

@ -1,14 +0,0 @@
#!/usr/bin/python
#
# (c) 2006 Jan Dittberner <jan@gnuviech.info>
# $Id$
#
from distutils.core import setup
setup(name='gnuviechadmin-common',
version='0.1.0',
description='common classes for gnuviech admin clients and server',
author='Jan Dittberner',
author_email='jan@gnuviech.info',
url='http://www.gnuviech.info/gnuviechadmin',
packages=['gnuviechadminCommon'],
package_dir= {'': 'src'})

View file

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Webservice description for gnuviechadmin
(c) 2006 Jan Dittberner <jan@dittberner.info>
Version: $Id$
-->
<wsdl:definitions name="gnuviechadmin"
targetNamespace="https://ssl.gnuviech.info/gnuviechadmin/"
xmlns:tns="https://ssl.gnuviech.info/gnuviechadmin/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="https://ssl.gnuviech.info/gnuviechadmin/">
<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 name="AuthResponse" element="tns:AuthCode" />
</wsdl:message>
<wsdl:message name="AuthRequest">
<wsdl:part name="AuthRequest" element="tns:LoginInfo" />
</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 use="literal" parts=" AuthRequest" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" parts=" AuthResponse" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="gnuviechadmin">
<wsdl:port name="gnuviechadminSOAP" binding="tns:gnuviechadminSOAP">
<soap:address location="https://ssl.gnuviech.info/gnuviechadmin" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

View file

@ -1,4 +0,0 @@
#
# (c) 2006 Jan Dittberner <jan@dittberner.info>
# $Id$
#

View file

@ -1,92 +0,0 @@
##################################################
# src/gnuviechadminCommon/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::
_login: str
_password: str
@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
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 )

View file

@ -1,80 +0,0 @@
##################################################
# src/gnuviechadminCommon/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 LoginInfo_Dec(ZSI.TCcompound.Struct):
schema = 'https://ssl.gnuviech.info/gnuviechadmin/'
literal = 'LoginInfo'
def __init__(self, name=None, ns=None, **kw):
name = name or self.__class__.literal
ns = ns or self.__class__.schema
# 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 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