ó –‡Lc@sdZddlTddlmZeeƒZdefd„ƒYZdefd„ƒYZdefd „ƒYZ d efd „ƒYZ d dd „ƒYZ de fd„ƒYZ de fd„ƒYZ de fd„ƒYZddd„ƒYZddd„ƒYZddd„ƒYZdS(sH The plugin module provides classes for implementation of suds plugins. iÿÿÿÿ(t*(t getLoggertContextcBseZdZRS(s Plugin context. (t__name__t __module__t__doc__(((s//usr/lib/python2.7/site-packages/suds/plugin.pyRst InitContextcBseZdZRS(sU Init Context. @ivar wsdl: The wsdl. @type wsdl: L{wsdl.Definitions} (RRR(((s//usr/lib/python2.7/site-packages/suds/plugin.pyR#stDocumentContextcBseZdZRS(sÌ The XML document load context. @ivar url: The URL. @type url: str @ivar document: Either the XML text or the B{parsed} document root. @type document: (str|L{sax.element.Element}) (RRR(((s//usr/lib/python2.7/site-packages/suds/plugin.pyR,stMessageContextcBseZdZRS(sè The context for sending the soap envelope. @ivar envelope: The soap envelope to be sent. @type envelope: (str|L{sax.element.Element}) @ivar reply: The reply. @type reply: (str|L{sax.element.Element}|object) (RRR(((s//usr/lib/python2.7/site-packages/suds/plugin.pyR7stPlugincBseZdZRS(s Plugin base. (RRR(((s//usr/lib/python2.7/site-packages/suds/plugin.pyR Bst InitPlugincBseZdZd„ZRS(s2 The base class for suds I{init} plugins. cCsdS(sú Suds client initialization. Called after wsdl the has been loaded. Provides the plugin with the opportunity to inspect/modify the WSDL. @param context: The init context. @type context: L{InitContext} N((tselftcontext((s//usr/lib/python2.7/site-packages/suds/plugin.pyt initializedNs(RRRR (((s//usr/lib/python2.7/site-packages/suds/plugin.pyR IstDocumentPlugincBs eZdZd„Zd„ZRS(s6 The base class for suds I{document} plugins. cCsdS(s$ Suds has loaded a WSDL/XSD document. Provides the plugin with an opportunity to inspect/modify the unparsed document. Called after each WSDL/XSD document is loaded. @param context: The document context. @type context: L{DocumentContext} N((R R ((s//usr/lib/python2.7/site-packages/suds/plugin.pytloaded^scCsdS(s Suds has parsed a WSDL/XSD document. Provides the plugin with an opportunity to inspect/modify the parsed document. Called after each WSDL/XSD document is parsed. @param context: The document context. @type context: L{DocumentContext} N((R R ((s//usr/lib/python2.7/site-packages/suds/plugin.pytparsedhs(RRRRR(((s//usr/lib/python2.7/site-packages/suds/plugin.pyRYs t MessagePlugincBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(s: The base class for suds I{soap message} plugins. cCsdS(s: Suds will send the specified soap envelope. Provides the plugin with the opportunity to inspect/modify the envelope Document before it is sent. @param context: The send context. The I{envelope} is the envelope docuemnt. @type context: L{MessageContext} N((R R ((s//usr/lib/python2.7/site-packages/suds/plugin.pyt marshalledxs cCsdS(s* Suds will send the specified soap envelope. Provides the plugin with the opportunity to inspect/modify the message text it is sent. @param context: The send context. The I{envelope} is the envelope text. @type context: L{MessageContext} N((R R ((s//usr/lib/python2.7/site-packages/suds/plugin.pytsendingƒs cCsdS(s0 Suds has received the specified reply. Provides the plugin with the opportunity to inspect/modify the received XML text before it is SAX parsed. @param context: The reply context. The I{reply} is the raw text. @type context: L{MessageContext} N((R R ((s//usr/lib/python2.7/site-packages/suds/plugin.pytreceivedŽs cCsdS(s? Suds has sax parsed the received reply. Provides the plugin with the opportunity to inspect/modify the sax parsed DOM tree for the reply before it is unmarshalled. @param context: The reply context. The I{reply} is DOM tree. @type context: L{MessageContext} N((R R ((s//usr/lib/python2.7/site-packages/suds/plugin.pyR™s cCsdS(sE Suds has unmarshalled the received reply. Provides the plugin with the opportunity to inspect/modify the unmarshalled reply object before it is returned. @param context: The reply context. The I{reply} is unmarshalled suds object. @type context: L{MessageContext} N((R R ((s//usr/lib/python2.7/site-packages/suds/plugin.pyt unmarshalled¤s (RRRRRRRR(((s//usr/lib/python2.7/site-packages/suds/plugin.pyRss  tPluginContainercBsMeZdZieefd6eefd6eefd6Z d„Z d„Z RS(sà Plugin container provides easy method invocation. @ivar plugins: A list of plugin objects. @type plugins: [L{Plugin},] @cvar ctxclass: A dict of plugin method / context classes. @type ctxclass: dict tinittdocumenttmessagecCs ||_dS(s_ @param plugins: A list of plugin objects. @type plugins: [L{Plugin},] N(tplugins(R R((s//usr/lib/python2.7/site-packages/suds/plugin.pyt__init__¿scCs{|jj|ƒ}|rjg}|\}}x0|jD]%}t||ƒr4|j|ƒq4q4Wt||ƒStd|‚dS(Nsplugin domain (%s), invalid(tdomainstgetRt isinstancetappendt PluginDomaint Exception(R tnametdomainRtctxtpclasstp((s//usr/lib/python2.7/site-packages/suds/plugin.pyt __getattr__Æs  ( RRRRR RRRRRRR'(((s//usr/lib/python2.7/site-packages/suds/plugin.pyR°s   R cBs eZdZd„Zd„ZRS(s˜ The plugin domain. @ivar ctx: A context. @type ctx: L{Context} @ivar plugins: A list of plugins (targets). @type plugins: list cCs||_||_dS(N(R$R(R R$R((s//usr/lib/python2.7/site-packages/suds/plugin.pyRÜs cCs t||ƒS(N(tMethod(R R"((s//usr/lib/python2.7/site-packages/suds/plugin.pyR'às(RRRRR'(((s//usr/lib/python2.7/site-packages/suds/plugin.pyR Ós R(cBs eZdZd„Zd„ZRS(s” Plugin method. @ivar name: The method name. @type name: str @ivar domain: The plugin domain. @type domain: L{PluginDomain} cCs||_||_dS(s• @param name: The method name. @type name: str @param domain: A plugin domain. @type domain: L{PluginDomain} N(R"R#(R R"R#((s//usr/lib/python2.7/site-packages/suds/plugin.pyRís cKs•|jjƒ}|jj|ƒxo|jjD]a}y8t||jdƒ}|rit|ƒri||ƒnWq,t k rŒ}t j |ƒq,Xq,W|S(N( R#R$t__dict__tupdateRtgetattrR"tNonetcallableR!tlogt exception(R tkwargsR$tplugintmethodtpe((s//usr/lib/python2.7/site-packages/suds/plugin.pyt__call__÷s(RRRRR4(((s//usr/lib/python2.7/site-packages/suds/plugin.pyR(äs N(((((RtsudstloggingRRR.tobjectRRRRR R RRRR R((((s//usr/lib/python2.7/site-packages/suds/plugin.pyts     =#