- make classes for SOAP Server and Client
git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@162 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
parent
68e3df3641
commit
c6ef649c08
1 changed files with 10 additions and 2 deletions
|
@ -1,9 +1,17 @@
|
|||
#!/usr/bin/python
|
||||
from SOAPpy import SOAPProxy
|
||||
import socket
|
||||
|
||||
class SOAPClient:
|
||||
def __init__(self):
|
||||
self.server = SOAPProxy('https://ssl.gnuviech.info/soap')
|
||||
self.server = SOAPProxy('http://localhost:8080/')
|
||||
|
||||
def echo(self, value):
|
||||
try:
|
||||
return self.server.echo(value);
|
||||
except socket.error:
|
||||
return "couldn't connect"
|
||||
|
||||
if __name__ == "__main__":
|
||||
client = SOAPClient()
|
||||
print client.echo("Ein Test ")
|
Loading…
Reference in a new issue