Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix Import doctor as plugin; Add plugins.document.parsed() call for s…

…chema defined in the wsdl.

git-svn-id: http://svn.fedorahosted.org/svn/suds/trunk@698 0b8c961e-115e-4cb0-8d11-a7d6dae58e8c
  • Loading branch information...
commit 28d61fcc96b84d6848c60c15b8206a933cbd5e6b 1 parent eddba1c
jortel authored
View
3  python-suds.spec
@@ -67,6 +67,9 @@ rm -rf $RPM_BUILD_ROOT
- 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.
View
2  suds/__init__.py
@@ -27,7 +27,7 @@
#
__version__ = '0.4'
-__build__="GA R697-20100908"
+__build__="GA R698-20100910"
#
# Exceptions
View
3  suds/wsdl.py
@@ -30,6 +30,7 @@
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
@@ -209,8 +210,10 @@ def resolve(self):
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)
container.add(schema)
if not len(container): # empty
View
6 suds/xsd/doctor.py
@@ -22,7 +22,7 @@
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__)
@@ -187,7 +187,7 @@ def exists(self, root):
return 0
-class ImportDoctor(Doctor, MessagePlugin):
+class ImportDoctor(Doctor, DocumentPlugin):
"""
Doctor used to fix missing imports.
@ivar imports: A list of imports to apply.
@@ -213,7 +213,7 @@ def examine(self, root):
imp.apply(root)
def parsed(self, context):
- root = context.root
+ root = context.document
if Namespace.xsd(root.namespace()):
self.examine(root)
else:
Please sign in to comment.
Something went wrong with that request. Please try again.