Hi I am looking to create a SOAP service within my Django App, but have come across a few hitches.
Firstly I have been able to successfully follow the soaplib Hello World tutorial (google “soaplib hello world” since I only can use 1 hyperlink as this is my first question) which uses a CheryPy WSGI server to run the service, and the soaplib client to initiate a SOAP request.
I am having trouble converting that into a service within Django through following this djangosnippets snippet. Currently I am using the Django development server.
Viewing http://localhost:8000/hello_world/ in the browser or making a SOAP request using the soaplib client returns a Django error page with the error:
Tried hello_world_service in module foo.views. Error was: 'module' object has no attribute 'hello_world_service'
Obviously urls.py is matching correctly, but according to that django snippet I linked to, there shouldn’t be a view hello_world_service.
I feel I am missing the last step and any knowledge would be really helpful.
Thanks, Marcus
According to the snippet you link to, the bottom of your
views.pyfile should contain the following line:This maps an instance of the
HelloWorldServiceclass onto the namehello_world_service, for use in yoururls.pyfile.If that line is included, then there will indeed be a view with that name – so the URL Dispatcher should be able to find it.
Hope that does it,
Rob