views:

413

answers:

3

I have a medium sized application that runs as a .net web-service which I do not control, and I want to create a loose pythonic API above it to enable easy scripting.

I wanted to know what is the best/most practical solution for using web-services in python.

Edit: I need to consume a complex soap WS and I have no control over it.

+1  A: 

Are you trying to consume a SOAP WS? or write a web service/web app in Python?

http://diveintopython.org/soap_web_services/

Jared Updike
+2  A: 

If I have to expose APIs, I prefer doing it as JSON. Python has excellent support for JSON objects (JSON Objects are infact python dictionaries)

good tip about preferring JSON (although he doesn't control the web service), but JSON objects are not necessarily Python dictionaries - Python is missing "true", "false", and "null" (vs. "True", "False", and "None'). You still need a parser+stringifier.
orip
+1  A: 

Jython and IronPython give access to great Java & .NET SOAP libraries.

If you need CPython, ZSI has been flaky for me, but it could be possible to use a tool like Robin to wrap a good C++ SOAP library such as gSOAP or Apache Axis C++

orip