summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjortel <devnull@localhost>2010-09-13 16:26:09 +0000
committerjortel <devnull@localhost>2010-09-13 16:26:09 +0000
commitdac3ac9229a921b945e4d4a58fe0e7af8095e2a7 (patch)
tree95fc44869c21f7147c67c101d8a974615a20ff27
parentd9c2c74b8c3d967690a915b22dee7e1042aa1783 (diff)
downloadsuds-dac3ac9229a921b945e4d4a58fe0e7af8095e2a7.tar.gz
Fix regression of ticket #348 introduced in r698.
-rw-r--r--suds/__init__.py2
-rw-r--r--suds/wsdl.py3
-rw-r--r--suds/xsd/doctor.py22
3 files changed, 15 insertions, 12 deletions
diff --git a/suds/__init__.py b/suds/__init__.py
index 7153154..166a206 100644
--- a/suds/__init__.py
+++ b/suds/__init__.py
@@ -27,7 +27,7 @@ import sys
#
__version__ = '0.4'
-__build__="GA R698-20100910"
+__build__="GA R699-20100913"
#
# Exceptions
diff --git a/suds/wsdl.py b/suds/wsdl.py
index a2b1f79..8bba88f 100644
--- a/suds/wsdl.py
+++ b/suds/wsdl.py
@@ -30,7 +30,6 @@ 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
@@ -210,10 +209,8 @@ 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 33ef121..d7bbc14 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 DocumentPlugin
+from suds.plugin import DocumentPlugin, DocumentContext
log = getLogger(__name__)
@@ -208,13 +208,19 @@ class ImportDoctor(Doctor, DocumentPlugin):
"""
self.imports += imports
- def examine(self, root):
+ def examine(self, node):
for imp in self.imports:
- imp.apply(root)
+ imp.apply(node)
def parsed(self, context):
- root = context.document
- if Namespace.xsd(root.namespace()):
- self.examine(root)
- else:
- pass \ No newline at end of file
+ node = context.document
+ # xsd root
+ if node.name == 'schema' and Namespace.xsd(node.namespace()):
+ self.examine(node)
+ return
+ # look deeper
+ context = DocumentContext()
+ for child in node:
+ context.document = child
+ self.parsed(context)
+ \ No newline at end of file