Anonymous committed 2b44902

Fix Import doctor as plugin; Add plugins.document.parsed() call for schema defined in the wsdl.

Comments (0)

Files changed (4)

 - Add plugins facility. 
 - Fixed Tickets: #251, #313, #314, #334
+* Thu Jul 22 2010 David Malcolm <> - 0.3.9-2
+- Rebuilt for
 * Thu Dec 17 2009 jortel <> - 0.3.9-1
 - Bumped python requires to 2.4
 - Replaced stream-based caching in the transport package with document-based caching.
 __version__ = '0.4'
-__build__="GA R697-20100908"
+__build__="GA R698-20100910"
 # Exceptions
 from suds.xsd.schema import Schema, SchemaCollection
 from suds.xsd.query import ElementQuery
 from suds.sudsobject import Object, Facade, Metadata
+from suds.plugin import PluginContainer
 from suds.reader import DocumentReader, DefinitionsReader
 from urlparse import urljoin
 import re, soaparray
     def build_schema(self):
         """ Process L{Types} objects and create the schema collection """
         container = SchemaCollection(self)
+        plugins = PluginContainer(self.options.plugins)
         for t in [t for t in self.types if t.local()]:
             for root in t.contents():
+                plugins.document.parsed(url=self.url, document=root)
                 schema = Schema(root, self.url, self.options, container)
         if not len(container): # empty


 from logging import getLogger
 from suds.sax import splitPrefix, Namespace
 from suds.sax.element import Element
-from suds.plugin import MessagePlugin
+from suds.plugin import DocumentPlugin
 log = getLogger(__name__)
         return 0
-class ImportDoctor(Doctor, MessagePlugin):
+class ImportDoctor(Doctor, DocumentPlugin):
     Doctor used to fix missing imports.
     @ivar imports: A list of imports to apply.
     def parsed(self, context):
-        root = context.root
+        root = context.document
         if Namespace.xsd(root.namespace()):