Fix the little demo

This commit is contained in:
Christophe de Vienne 2011-10-18 16:56:37 +02:00
parent 08ffc0f71c
commit 63e91ba322
1 changed files with 9 additions and 8 deletions

View File

@ -12,9 +12,7 @@ Then::
"""
from wsme import *
from wsme.wsgi import WSRoot
from wsme.protocols import soap
from wsme.wsgi import adapt
import logging
@ -45,13 +43,16 @@ class DemoRoot(WSRoot):
return p
def app_factory(global_config, **local_conf):
protocols = [
'restjson',
soap.SoapProtocol(
root = DemoRoot()
root.addprotocol('soap',
tns='http://example.com/demo',
typenamespace='http://example.com/demo/types',
baseURL='http://127.0.0.1:8989/',
)]
return DemoRoot(protocols)
)
root.addprotocol('restjson')
return adapt(root)
logging.basicConfig(level=logging.DEBUG)