A reusable django webservices app.
- Clone this app into your django project as an app.
- Update your django project settings.py to add webservices app.
- Update your django project urls.py to serve the webservice requests.
- Restart your django server.
INSTALLED_APPS += ('webservices', )
urlpatterns = patterns('',
url(r'^soap/','webservices.views.soap_services', name='soap_services'), #Added here
)
wsdl:
http://yourhost/soap/?wsdl
rpc:
http://yourhost/soap/get_user?userid=1&username=Tom
soap:
from suds.client import Client
client = Client(url='http://yourhost/soap/?wsdl')
print client
print client.service.get_user(userid=1, username='Tom')