I have a simple html service, developed in django.
You enter your name – it posts this, and returns a value (male/female).
I need to ofer this as a web service. I have no idea where to start.
I want to accept a xml request, and provide an xml response – thats it.
Can anyone give ma any pointers – Googling it is difficult when you dont know what your searching for.
See the Generating non-HTML content in the django book for instructions.
Basically, it’s as simple as this:
Edit:
You can send a post with xml_data set to the XML string, or you can send an XML request.
Here’s some code for sending XML data to a web service, adapted from this site:
From django, you’d use
request.raw_post_datato get at the XML directly.