summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjortel <devnull@localhost>2010-09-10 13:51:47 +0000
committerjortel <devnull@localhost>2010-09-10 13:51:47 +0000
commitd9c2c74b8c3d967690a915b22dee7e1042aa1783 (patch)
tree8f28236b4f418f535fd7fee8dc0e0b9413b63248
parentf989cdca38bdc180ce9d10b4c017f46b6af0f86a (diff)
downloadsuds-d9c2c74b8c3d967690a915b22dee7e1042aa1783.tar.gz
Fix Import doctor as plugin; Add plugins.document.parsed() call for schema defined in the wsdl.
-rw-r--r--python-suds.spec3
-rw-r--r--suds/__init__.py2
-rw-r--r--suds/wsdl.py3
-rw-r--r--suds/xsd/doctor.py6
4 files changed, 10 insertions, 4 deletions
diff --git a/python-suds.spec b/python-suds.spec
index 54e88d4..72a31fb 100644
--- a/python-suds.spec
+++ b/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.
diff --git a/suds/__init__.py b/suds/__init__.py
index 68d6510..7153154 100644
--- a/suds/__init__.py
+++ b/suds/__init__.py
@@ -27,7 +27,7 @@ import sys
#
__version__ = '0.4'
-__build__="GA R697-20100908"
+__build__="GA R698-20100910"
#
# Exceptions
diff --git a/suds/wsdl.py b/suds/wsdl.py
index 8bba88f..a2b1f79 100644
--- a/suds/wsdl.py
+++ b/suds/wsdl.py
@@ -30,6 +30,7 @@ from suds.xsd import qualify, Namespace
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 @@ class Definitions(WObject):
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
diff --git a/suds/xsd/doctor.py b/suds/xsd/doctor.py
index 700919c..33ef121 100644
--- a/suds/xsd/doctor.py
+++ b/suds/xsd/doctor.py
@@ -22,7 +22,7 @@ schema(s).
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 @@ class Import:
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 @@ class ImportDoctor(Doctor, MessagePlugin):
imp.apply(root)
def parsed(self, context):
- root = context.root
+ root = context.document
if Namespace.xsd(root.namespace()):
self.examine(root)
else: