Hi,
myclient.filter.addcallable(SENDING, mycallable)
XML text has been received, processed and converted to the response object.For whatever the reason, a plugin may choose to examine and/or change the objects or the content of the objects
Nicely thought JeffAgain, inspecting/changing the objects before they are converted to the SOAP envelope may be wished.
Thanks for you comments Joshua.
On 05/13/2010 01:31 PM, Joshua J. Kugler wrote:
On Thursday 13 May 2010, Jeff Ortel elucidated thus:
All,
Suds currently has (2) ways (hooks) for users to plug in
functionality (not including Transports). First, is the schema
Doctor used to repair broken XSDs at runtime. Second, is the
Binding.replyfilter used to alter the raw reply text. In most cases,
the replyfilter is used to strip out undesirable characters before
sax parsing.
Recently, I needed to add a third hook to provide users with a means
to modify the outgoing soap envelope for certain edge cases. Rather
then add yet another one-off hook, it seems better to add a more
general "plugin" facility. Something more formal and extensible.
And so I did in 0.4 (beta).
Please see: https://fedorahosted.org/suds/wiki/Documentation#PLUGINS
and provide comments/suggestions including additional hooks.
Initial comments (just clarification, mostly).
Excellent question! I'll beef up the description for each hook on the wiki and epydocs.
- Clarify in the docs exactly when the hooks get called
, and what they contain.
Please see: http://jortel.fedorapeople.org/suds/doc/suds.plugin.Plugin-class.htmlPrimarily, the WSDL object has been constructed and digested.
"After client is initialized."
OK, but what (loosely) has happend at that point?
And before *what*?
Creation of:
- The client.service object.
- The client.factory object.
- The ServiceDefinition ( which is what you see when you __str__() the client ).The WSDL object isa wsdl.Definitions instance.
What is the WSDL object?
Please see: http://jortel.fedorapeople.org/suds/doc/suds.plugin.InitContext-class.html
The raw file (object)?
Nope.Nope.
The response from urllib2.urlopen()?
Agreed.
- Same for "loaded." What does "loading" a WSDL or XSD entail?
Opening? Parsing? It says "contains the document root." But:
loaded: "called before loading"..."contains document root" Sounds like
it's called after something is loaded...the name is confusing.
The description needs to be reworded for clarity. The term "load" refers to XML document loading which is basically open/download & SAX parsed into a DOM tree. The 'context' argument isa plugin.LoadContext ( http://jortel.fedorapeople.org/suds/doc/suds.plugin.LoadContext-class.html ) which contains the loaded document root which is a sax.Element.Cool.
"Sending" and "received" seem clear enough.
Great. Thanks again!
I'm sure I'll have more comments...those were the ones that struck me
first.
j
_______________________________________________
suds mailing list
suds@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/suds