[Soap-Python] Twisted SOAP server

Jamie Kirkpatrick jkp at kirkconsulting.co.uk
Fri Jun 25 10:00:15 CEST 2010


Correct, it does somewhat defeat the point.  Async WSGI has long been
discussed but a standard was never arrived at (though a PEP was proposed).

I once wrote some experimental code using Greenlets to emulate this kind of
functionality however (running under Tornado but the same idea):
http://gist.github.com/240571.

-- 
Jamie Kirkpatrick
07818 422311
On 23 June 2010 16:25, Jason Baker <jbaker at zeomega.com> wrote:

> On Wed, Jun 23, 2010 at 10:21 AM, Alberto Morales <amorales at ull.es> wrote:
>
>> Brad Allen escribió:
>>
>>> I just learned that Twisted has some built-in SOAP support...based on
>>> some of the module names I'm guess it uses SOAPpy.
>>>
>>> http://twistedmatrix.com/documents/current/web/howto/xmlrpc.html
>>>
>>> Has anybody here tried using soaplib with Twisted?
>>> _______________________________________________
>>> Soap mailing list
>>> Soap at python.org
>>> http://mail.python.org/mailman/listinfo/soap
>>>
>>>
>> Hello,
>>
>> A few months ago, i tried a proof of concept of running soaplib inside a
>> twisted reactor. I attach the recipe. It is done using versions in Debian
>> Lenny. It should be accesible vía
>> http://localhost:8080/hello/?service.wsdl
>>
>> Greetings.
>>
>> ====
>>
>> from soaplib.wsgi_soap import SimpleWSGISoapApp
>> from soaplib.service import soapmethod
>> from soaplib.serializers.primitive import Array, String
>>
>> class HelloWorldService(SimpleWSGISoapApp):
>>   @soapmethod(_returns=Array(String))
>>   def hello(self):
>>       "A method that says hello"
>>       return ["hello", "world"]
>>
>> if __name__=='__main__':
>>   from twisted.web import server, wsgi, resource
>>   from twisted.internet import reactor
>>   server_name='0.0.0.0'
>>   server_port=8080
>>   root = resource.Resource()
>>   root.putChild("hello", wsgi.WSGIResource(reactor,
>> reactor.getThreadPool(), HelloWorldService()))
>>   reactor.listenTCP(server_port, server.Site(root), interface=server_name)
>>   reactor.run()
>>
>
> Correct me if I'm wrong, but doesn't using WSGI like this defeat the
> purpose of using Twisted?  After all, WSGI is inherently synchronous.
>
> _______________________________________________
> Soap mailing list
> Soap at python.org
> http://mail.python.org/mailman/listinfo/soap
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/soap/attachments/20100625/e97d7c5c/attachment.html>


More information about the Soap mailing list