Browse Source

Modified Files:

WSDLTools.py -- just a few minor changes so the new schema class
		will be used instead of the schema tns placeholder.

		Might want to add an argument to WSDL.load method so that
                programmer can specify the placeholder or actual
		implementation.

        XMLSchema.py -- mostly new, unused original code is commented out at the bottom.
main
Joshua Boverhof 21 years ago
parent
commit
3b1ae2194a
2 changed files with 2331 additions and 3 deletions
  1. +8
    -3
      WSDLTools.py
  2. +2323
    -0
      XMLSchema.py

+ 8
- 3
WSDLTools.py View File

@@ -10,7 +10,7 @@
ident = "$Id$"

from Utility import DOM, Collection
from XMLSchema import XMLSchema
from XMLSchema import XMLSchema, SchemaReader, WSDLToolsAdapter
from StringIO import StringIO
import urllib

@@ -151,12 +151,15 @@ class WSDL:
location = DOM.getAttr(element, 'location')
imported[location] = 1

reader = SchemaReader()
for element in DOM.getElements(definitions, None, None):
localName = element.localName

if not DOM.nsUriMatch(element.namespaceURI, NS_WSDL):
if localName == 'schema':
self.types.addSchema(XMLSchema(element))
self.types.addSchema(
reader.loadFromNode(WSDLToolsAdapter(self), element)
)
else:
self.extensions.append(element)
continue
@@ -205,7 +208,9 @@ class WSDL:
self.types.documentation = GetDocumentation(element)
for item in DOM.getElements(element, None, None):
if item.localName == 'schema':
self.types.addSchema(XMLSchema(item))
self.types.addSchema(
reader.loadFromNode(WSDLToolsAdapter(self), item)
)
else:
self.types.addExtension(item)
continue


+ 2323
- 0
XMLSchema.py
File diff suppressed because it is too large
View File


Loading…
Cancel
Save