23 lines
675 B
Python
23 lines
675 B
Python
#!/usr/bin/python
|
|
import sys
|
|
import socket
|
|
from ZSI import ServiceProxy
|
|
|
|
class SOAPClient:
|
|
def __init__(self):
|
|
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 authenticate(self, login, password):
|
|
try:
|
|
response = self.service.Authenticate(login=login, password=password)
|
|
print response
|
|
except socket.error:
|
|
return "couldn't connect"
|
|
|
|
if __name__ == "__main__":
|
|
client = SOAPClient()
|
|
print client.authenticate("jan", "jan") |