ZSI-services
git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@181 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
parent
4a8a10548a
commit
2c8c2228c0
8 changed files with 159 additions and 636 deletions
|
@ -1,18 +1,23 @@
|
|||
#!/usr/bin/python
|
||||
from SOAPpy import SOAPProxy
|
||||
import sys
|
||||
import socket
|
||||
from ZSI import ServiceProxy
|
||||
|
||||
class SOAPClient:
|
||||
def __init__(self):
|
||||
self.server = SOAPProxy('http://localhost:8080/',
|
||||
namespace = 'urn:gnuviech-admin-services')
|
||||
url = 'http://localhost:8080/gnuviechadmin'
|
||||
self.service = ServiceProxy(url, use_wsdl=True,
|
||||
tracefile=sys.stdout)
|
||||
print 'service is ', self.service
|
||||
print self.service.__dict__
|
||||
|
||||
def echo(self, value):
|
||||
def authenticate(self, login, password):
|
||||
try:
|
||||
return self.server.echo(value);
|
||||
response = self.service.Authenticate(login=login, password=password)
|
||||
print response
|
||||
except socket.error:
|
||||
return "couldn't connect"
|
||||
|
||||
if __name__ == "__main__":
|
||||
if __name__ == "__main__":
|
||||
client = SOAPClient()
|
||||
print client.echo("Ein Test ")
|
||||
print client.authenticate("jan", "jan")
|
Loading…
Add table
Add a link
Reference in a new issue