1
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
2
# See LICENSE for details.
5
"""Example of publishing SOAP methods.
10
>>> p = SOAPpy.SOAPProxy('http://localhost:8080/')
20
from twisted.web import soap, server
21
from twisted.internet import reactor, defer
24
class Example(soap.SOAPPublisher):
25
"""Publish two methods, 'add' and 'echo'."""
27
def soap_echo(self, x):
30
def soap_add(self, a=0, b=0):
32
soap_add.useKeywords = 1
34
def soap_deferred(self):
35
return defer.succeed(2)
38
reactor.listenTCP(8080, server.Site(Example()))