What is a good framework for a soap service? - python

I'm looking for a good framework to use for a soap service. I'd prefer to use a pythonic framework, but after looking at soaplib/rpclib (too unstable), SOAPy (doesn't work with 2.7) and ZSI (too...confusing), I'm not sure that's possible.
I'm fine with it being in another language, though I'm hesitant to use php's soap libraries due to some previous issues I've had with php.
Yes, I would very much like to to be SOAP as this is destined to primarily provide data to a Silverlight client, and VS makes it dead simple to work with soap services. And no, it can't be an WCF service as all of the hosts are linux-based.
Much appreciated.

Checkout Twisted, great framework for building network services. And soap is basically an extension of xmlrpc.
http://twistedmatrix.com/trac/
http://twistedmatrix.com/documents/10.1.0/web/howto/xmlrpc.html#auto4
http://twistedmatrix.com/documents/10.1.0/api/twisted.web.soap.Proxy.html

I have used Spring WS, JAVA in my previous project. It worked well, without any glitches. We served more than a million API request a day.

Related

creating soap webservices and generating wsdl in python

I have found enough support for creating webservices using soap in java. But not able to find much support on creating soap web services in python.
Got soaplib https://pypi.python.org/pypi/soaplib? but support is less. Please suggest some useful libraries for SOAP in python
soaplib worked fine for me with django. All of the cool kids are using REST api's and slinging JSON back and forth. But I like XML. XML is like violence, if it doesn't solve your problem, you are not using enough.
stackoverflow.com/questions/15436749/how-to-call-soap-api-with-python
www.diveintopython.net/soap_web_services/
stackoverflow.com/questions/18175489/python-soap-using-requests

Create python soap server based on wsdl

I have an wsdl file describing the communication server-client on a Java product.
I'm implementing a new server based on Python that will implement the same services.
Do you know of any method to create the Python server code based on the wsdl, that does not requires me to write all of the complextypes involved?
Also, what Api do you recommend?
This question has not received enough attention.
The currently accepted answer is good, but its answer is 'no'. Is there really no reasonably maintained and general solution?
Unfortunately, I don't think the negative answer is due to lack of attention to the question. There really is no support for WSDL in python. If you want to avoid the complexities of building your own soap envelope from scratch the only thing I can recommend you is building a sample envelope using any of the many soap webservices tools (soapui for instance) and then use it as a template string (I know, horrible) in your python code
UPDATE you could use spyne. It's a python RPC toolkit that among other protocols supports SOAP. It will create the WSDL for you, but if your objective is implementing the service described by the WSDL you already have then you'll have to fine tune your spyne service (written in python) until the generated WSDL matches the original
When it comes to SOAP support, Python unfortunately no longer is with "batteries included". The support on client side is acceptable but on server side you are basically on your own.
You might want to look at the following for starters:
http://wiki.python.org/moin/WebServices
http://pywebsvcs.sourceforge.net/
http://doughellmann.com/2009/09/01/evaluating-tools-for-developing-with-soap-in-python.html
If you really want to go on this route, it seems that ZSI is the tool to use, although I have my doubts that it will work with the latest 2.x Python distribution.
Using Python 2.6.6, I tried to use ZSI 2.0 to build a web service starting from the WSDL. Got some "module has been deprecated" warnings when generating the code with wsdl2py and wsdl2dispatch, had to separately install PyXML and hack my sys.path just to make it resolve first or else I got "module ext.reader does not exist" then only to end up with a disappointing "ZSI:EvaluateException Got None for nillable(False), minOccurs(1) element" error on a basic "Hello world!" WS with a required element.
Switched to ZSI 2.1_a1 which no longer needs PyXML and wsdl2py does it all (what wsdl2dispatch did for 2.0) but still ended up in a dead end with "ZSI:EvaluateException Got None for nillable(False), minOccurs(1) element" errors.
The experience wasn't very fun but it was enough for me to form an opinion about what Python has to offer for SOAP web services... which ain't much (and that was just for basic web services nothing fancy like WS-* specs). YMMV!
EDIT : I recently bumped into this SO question, and although oriented versus a client solution, it does also mention a few libraries for building SOAP services.

python client app model comunication with a Json API

Sorry in advice for my strange english.
I have to develop a client application with python that comunicate with a php server that uses JSON protocol for data exchange.
There are many python frameworks that permit to implement MVC pattern, and in particular with structured Models for data handling, but all these model structures talk directly with a database in SQL language.
My purpose is to use a single server that shots data with JSON api to all kind of devices or platforms.
So, in my python application, i would to write a syncing model storage that talks directly with my Json Server as well as an ExtJs 4 app, using a framework or a library that permits to implement easily my request.
Does anybody knows any tools that permits this ?
If I understood your question correctly, you're looking for a proxying solution to put between application server clients. It may not be 100% fit but I'd suggest looking at Ext.Direct remoting that's built in Ext JS; RPC should work fine if you don't have to publish and maintain your API. As for proxying, take a look at RPC::ExtDirect::Client. It's an Ext.Direct client implementation in Perl; I developed it mostly for testing purposes but it can probably be used for proxying, too.
On a side note, I'm not sure why exactly you would want to implement such an architecture at all. It sounds overcomplicated for no good purpose.

Chat application using django

If i devlop a chat application using django will it have some performance problem?
Can i do server push in django?
I want to have PM and room discussions as well.
I released a Django app on Pypi and Github that provides a multi-user web chat.
It's based on Gevent: works well in multithreaded environments, but not in pre-forked ones such as gunicorn running more than 1 worker.
I'm just writing the documentation. The repo is: https://github.com/qubird/django-chatrooms
How about using tornado? I tried demo chat application of Tornado.
And also Tornado claims to have a better performance than django.
Let me know your thoughts.
grono.net has chat and PMs (although there are no rooms) and is built on django. Performance is pretty well, so I believe you should be able achieve the same performance. It depends, on how much connections you are expecting. grono.net is pretty big and it uses some caching and server distribution to perform well. But it all is doable on Django.
I think for a chat application you can use other technologies, such as AMQP(RabbitMQ, etc), Comet, etc.
But, for develop user profile, PMs, and other you can use Django.
Do not forget that performance still depends on server configuration (web server software, cache, db)
Basically Django is not the best way to do it.
However, if you are really stick to it and don't want to use to much solutions or/and want to keep it simple you can try with it:
http://popcnt.org/2008/01/django-evserver-asynchronous-server-for.html
Whih is asynchronous django server.
Also Twisted is worth checking out. I think that you described their tutorial scenario.

Python web server?

I want to develop a tool for my project using python. The requirements are:
Embed a web server to let the user get some static files, but the traffic is not very high.
User can configure the tool using http, I don't want a GUI page, I just need a RPC interface, like XML-RPC? or others?
Besides the web server, the tool need some background job to do, so these jobs need to be done with the web server.
So, Which python web server is best choice? I am looking at CherryPy, If you have other recommendation, please write it here.
what about the internal python webserver ?
just type "python web server" in google, and host the 1st result...
Well, I used web frameworks like TurboGears, my current projects are based on Pylons. The last ist fairly easy to learn and both come with CherryPy.
To do some background job you could implement that in pylons too.
Just go to your config/environment.py and see that example:
(I implemented a queue here)
from faxserver.lib.myQueue import start_queue
...
def load_environment(global_conf, app_conf):
...
start_queue()
It depends on your need if you simply use CherryPy or start to use something more complete like Pylons.
Use the WSGI Reference Implementation wsgiref already provided with Python
Use REST protocols with JSON (not XML-RPC). It's simpler and faster than XML.
Background jobs are started with subprocess.
Why dont you use open source build tools (continuous integration tools) like Cruise. Most of them come with a web server/xml interface and sometimes with fancy reports as well.
This sounds like a fun project. So, why don't write your own HTTP server? Its not so complicated after all, HTTP is a well-known and easy to implement protocol and you'll gain a lot of new knowledge!
Check documentation or manual pages (whatever you prefer) of socket(), bind(), listen(), accept() and so on.

Categories

Resources