Permalink
Browse files

make helloworld_http return json.

  • Loading branch information...
1 parent 781fef8 commit 034d3888b7be38c7f932d31f5f6354948a093d7d @plq plq committed Nov 17, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 examples/helloworld_http.py
@@ -53,7 +53,7 @@
from spyne.application import Application
from spyne.decorator import srpc
-from spyne.protocol.xml import XmlDocument
+from spyne.protocol.json import JsonDocument
from spyne.protocol.http import HttpRpc
from spyne.service import ServiceBase
from spyne.model.complex import Iterable
@@ -80,10 +80,9 @@ def say_hello(name, times):
from wsgiref.simple_server import make_server
logging.basicConfig(level=logging.DEBUG)
- logging.getLogger('spyne.protocol.xml').setLevel(logging.DEBUG)
application = Application([HelloWorldService], 'spyne.examples.hello.http',
- in_protocol=HttpRpc(), out_protocol=XmlDocument())
+ in_protocol=HttpRpc(), out_protocol=JsonDocument())
server = make_server('127.0.0.1', 7789, WsgiApplication(application))

0 comments on commit 034d388

Please sign in to comment.