1. shaung
  2. suds


jortel  committed 2b44902

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

  • Participants
  • Parent commits faf5b0f
  • Branches default

Comments (0)

Files changed (4)

File python-suds.spec

View file
  • Ignore whitespace
 - Add plugins facility. 
 - Fixed Tickets: #251, #313, #314, #334
+* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.3.9-2
+- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
 * Thu Dec 17 2009 jortel <jortel@redhat.com> - 0.3.9-1
 - Bumped python requires to 2.4
 - Replaced stream-based caching in the transport package with document-based caching.

File suds/__init__.py

View file
  • Ignore whitespace
 __version__ = '0.4'
-__build__="GA R697-20100908"
+__build__="GA R698-20100910"
 # Exceptions

File suds/wsdl.py

View file
  • Ignore whitespace
 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

File suds/xsd/doctor.py

View file
  • Ignore whitespace
 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()):