Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
46 lines (32 loc) · 1.12 KB

File metadata and controls

46 lines (32 loc) · 1.12 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"""
Example soap server using spyne.
Run with
uwsgi --http :8000 \
--wsgi-file soap_server.py \
--virtualenv ~/.pyenv/versions/3.5.2/envs/zeep \
-p 10
"""
import time
from spyne import Application, ServiceBase, Unicode, rpc
from spyne.protocol.soap import Soap11
from spyne.server.wsgi import WsgiApplication
class ExampleService(ServiceBase):
@rpc(Unicode, _returns=Unicode)
def slow_request(ctx, request_id):
time.sleep(1)
return u'Request: %s' % request_id
application = Application(
services=[ExampleService],
tns='http://tests.python-zeep.org/',
in_protocol=Soap11(validator='lxml'),
out_protocol=Soap11())
application = WsgiApplication(application)
if __name__ == '__main__':
import logging
from wsgiref.simple_server import make_server
logging.basicConfig(level=logging.DEBUG)
logging.getLogger('spyne.protocol.xml').setLevel(logging.DEBUG)
logging.info("listening to http://127.0.0.1:8000")
logging.info("wsdl is at: http://localhost:8000/?wsdl")
server = make_server('127.0.0.1', 8000, application)
server.serve_forever()
Morty Proxy This is a proxified and sanitized view of the page, visit original site.