Closed GoogleCodeExporter closed 8 years ago
The dispatcher is similar to SimpleXMLRPC, so it should be possible to
integrate with any framework or web server:
http://code.google.com/p/pysimplesoap/wiki/SoapDispatcher
I have no plans (nor time) to do this work, I know Django is a good framework
but currently I'm using web2py, you can see how it was integrated:
http://code.google.com/p/pysimplesoap/wiki/Web2Py
Anyway, if you need further advice or have code changes, I'll glad to assist
you and/or review/accept the patches.
Original comment by reingart@gmail.com
on 2 Sep 2010 at 4:55
[deleted comment]
# A simple views.py file sample for dispatcher
from pysimplesoap.server import SoapDispatcher
from django.http import HttpResponse
# just a remote function ;)
def func(data):
return data
# dispatcher declaration: however you like to declare it ;)
dispatcher = SoapDispatcher(
'my_dispatcher',
location = "http://localhost:8000/soap",
action = 'http://localhost:8000/soap',
namespace = "http://blah.blah.org/blah/blah/local",
prefix="bl1",
ns = "bl2")
# register func
dispatcher.register_function('func', func,
returns={'result': str},
args={'data': str})
def dispatcher_handler(request):
if request.method == "POST":
response = HttpResponse(mimetype="application/xml")
response.write(dispatcher.dispatch(request.raw_post_data))
else:
response = HttpResponse(mimetype="application/xml")
response.write(dispatcher.wsdl())
response['Content-length'] = str(len(response.content))
return response
Original comment by d4r...@gmail.com
on 9 Nov 2013 at 12:47
The example was moved to [Django] wiki page, thanks!
Original comment by reingart@gmail.com
on 22 Jan 2014 at 2:12
Original issue reported on code.google.com by
rafb...@gmail.com
on 23 Aug 2010 at 8:15