Skip to content

Instantly share code, notes, and snippets.

@FelixSchwarz
Created September 10, 2013 11:21
Show Gist options
  • Save FelixSchwarz/6508034 to your computer and use it in GitHub Desktop.
Save FelixSchwarz/6508034 to your computer and use it in GitHub Desktop.
from spyne.application import Application
from spyne.decorator import rpc
from spyne.model import Unicode
from spyne.protocol.soap.soap11 import Soap11
from spyne.service import ServiceBase
class Customer(Unicode):
class Attributes(Unicode.Attributes):
min_len=1
class DummyService(ServiceBase):
@rpc(Customer, _returns=Unicode)
def loadServices(ctx, serviceParams):
return '42'
spyne_application = Application([DummyService],
tns='dummy',
name='DummyService',
in_protocol=Soap11(validator='lxml'),
out_protocol=Soap11()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment