[Twisted-Python] Twisted and SOAP

Einar S. Idsø einar.twisted at norsk-esport.no
Tue Aug 31 23:16:04 MDT 2010


Well, at least I've found that the interest in SOAP in the Twisted
community is not very great ;) And understandably so. Unfortunately,
however, sometimes Twisted apps do need to talk to alternative
protocols, so it is a pity there's no recommended way of doing this.

For future reference: I ended up using suds with the following wrapper
provided to this list in April by Landreville. It seems to be working
great, so thanks Landreville :)

""" Wrapper for suds to create deferred instances. """
from suds.client import Client as SudsClient
from twisted.internet.threads import deferToThread

class Client(SudsClient):

   # method for returning a deferred for the RPC
   def callRemote(self, method, *args, **kwargs):
       def call(m, *a, **kw):
           result = self.service.__getattr__(m)(*a, **kw)
           return result
       d = deferToThread(call, method, *args, **kwargs)
       return d

Cheers,
Einar

On Thu, Aug 26, 2010 at 12:15 PM, Einar S. Idsø
<einar.twisted at norsk-esport.no> wrote:
> Hi,
>
> What is currently the recommended option for letting Twisted
> applications communicate with SOAP services?
>
> Cheers,
> Einar
>



More information about the Twisted-Python mailing list