How to write a Web Service for Google App Engine?

Question:

I am really new to Python and I have been looking for an example on how to write a Web Service (XML – SOAP) in Python with Google App Engine with no luck.

Can anyone point me to an article or give me an example on how to do this?

Asked By: Martin

||

Answers:

Here is a Python Web Services project that might be helpful.

EDIT

And here is a SOAP consuming demonstration….

Answered By: Mitchel Sellers

If you want to do something with App Engine specifically, there are libraries that will make it much faster on your end. I’d recommend looking at the XML-RPC and REST examples.

http://appengine-cookbook.appspot.com/recipe/xml-rpc-server-using-google-app-engine/

http://github.com/fczuardi/gae-rest/tree/master

Answered By: JJ.

I was curious about this myself and not finding anything I decided to try to get something to work. The short answer is that it turns out a SOAP service can actually be done using the latest alpha ZSI library. However it isn’t simple and I didn’t do much more than a simple request so it could fall apart with a complex type. I’ll try to find time to write a tutorial on how to do it and edit this answer with more detail.

Unless this is a hard requirement I would do what jamtoday says and go with a REST or RPC service. The SOAP way could be filled with trouble.

Update: For anyone interested I’ve written a tutorial on how to deploy a SOAP service to the Google App Engine. It is long process so I’m just linking to it instead of pasting it all here.

Answered By: carson

I know this is an old thread but just in case if someone happens to read this.
I have just start an open source project for creating web services on GAE.

Project site: http://code.google.com/p/webserviceservlet/

Hope this is helpful.

EDIT:
Just noticed that this is a python question and the link project is java project….

Answered By: Miki

You could take a look at the Bottle framework. It’s a Python framework which with you can easily create a REST api.
In my opinion, REST is definitely better than SOAP. It can be easily consumed by any software able to speak http, and it’s faster to implement.

Answered By: Francesco Ricceri