[Twisted-Python] Twisted & ZSI

Thomas Jacob jacob at internet24.de
Mon May 21 12:49:48 EDT 2007


ZSI 2.0 has built-in twisted support...

(see --twisted option for wsdl2py/dispatch)

Client side usage:

from MyService_services import *

port = MyServiceLocator().getMyService("http://myhost/MyService")
port.binding.defer = True

msg = myMethodRequest()
msg.value =...
...
deferred = port.myMethod(msg)
deferred.addCallback(....)


Server side usage:

Use twisted.web and derive a service class from WSResource:

The following should get you started:

http://proj.badc.rl.ac.uk/ndg/browser/TI12-security/trunk/python/ndg.security.server/ndg/security/server/SessionMgr/server-config.tac


On Mon, 2007-05-21 at 15:43 +0100, Matthew Glubb wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi All,
> 
> Apologies if this has been covered before but there seems to be a  
> dearth of documentation and examples on the net.
> 
> Does anyone have any tips for integrating ZSI with twisted? I am  
> struggling with the concept of the request / response objects and how  
> they relate to a twisted deferred object. Normally, under twisted, I  
> would return a deferred from the SOAP method call and let the reactor  
> take care of returning the response on callback/errback. How do I do  
> this using ZSI?
> 
> If anyone has got some *simple* example code, I'd love to see it. I  
> am not particularly concerned with general inter-operability, I am  
> more concerned with getting a particular SOAP client working with my  
> application. SOAPpy doesn't seem to be cutting the mustard, hence the  
> need to try ZSI.
> 
> Any tips *gratefully* received :)
> 
> Matt
> 
> 
> m a t t h e w   g l u b b
> 
> ________________________________________________________________________
> Z Group PLC
> 
> Tel: +44 (0) 8700 111 173
> Fax: +44 (0) 8707 051 393
> Txt: +44 (0) 7800 140 877
> Web: <http://www.zgroupplc.com/>
> 
> This  email  and  any  files  transmitted  with it are  confidential and
> intended solely for the use of the individual or entity to whom they are
> addressed.  The opinions  expressed in this mail are those of the author
> and do not necessarily  represent the views of the company.  If you have
> received this email in error please notify <service at zgroupplc.com>
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (Darwin)
> 
> iD8DBQFGUbALyI6MkdKPngkRAtB7AJ9uSOBnIDBIxHCAcsw9XGt7TLzWjgCfbnhw
> QBvvjGEhKT2AtEfhckjliNs=
> =AnFA
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python





More information about the Twisted-Python mailing list