It is definitely possible (and not too difficult) to use GAE to host "web services that exchange data via http and receive / return xml."
For the analysis of XML requests (supposedly included in the body of HTTP POST or PUT messages), you have several options, for example. pyexpat or minidom on top, see this thread (especially the last post on it).
If you want, you can also use the mini-module to create an XML response and write back (for example, using StringIO to save the formatted response and its write method as an argument to your minidom instance writexml , then expand and use this instance getvalue to get the desired result as a string). Although you are limited to pure Python and a few “whiteslisted" C-encoded extensions, such as pyexpat, this does not really limit your choice so much, nor does it make your life much more complicated.
Just don’t forget to set the type header of your response to text/xml (or some type of media that is even more specific and appropriate, if any, of course!) - and I recommend using UTF-8 (standard text encoding, which allows you to express all Unicode, being simple ASCII if your data is just ASCII! -), and not strange "code pages" or regionally restricted codes such as the ISO-8859 family.
Alex martelli
source share