예제 #1
0
 def build_schema(self):
     """ Process L{Types} objects and create the schema collection """
     container = SchemaCollection(self)
     for t in [t for t in self.types if t.local()]:
         for r in t.contents():
             entry = (r, self)
             container.add(entry)
     if not len(container):  # empty
         r = Element.buildPath(self.root, 'types/schema')
         entry = (r, self)
         container.add(entry)
     self.schema = container.load()
     for s in [t.schema() for t in self.types if t.imported()]:
         self.schema.merge(s)
     return self.schema
예제 #2
0
파일: wsdl.py 프로젝트: onnheimm/suds-lxml
 def build_schema(self):
     """Process L{Types} objects and create the schema collection."""
     container = SchemaCollection(self)
     for t in [t for t in self.types if t.local()]:
         for root in t.contents():
             schema = Schema(root, self.url, self.options, container)
             container.add(schema)
     if not len(container):
         root = Element.buildPath(self.root, "types/schema")
         schema = Schema(root, self.url, self.options, container)
         container.add(schema)
     self.schema = container.load(self.options)
     for s in [t.schema() for t in self.types if t.imported()]:
         self.schema.merge(s)
     return self.schema
예제 #3
0
파일: wsdl.py 프로젝트: bigbang4u2/mywork
 def build_schema(self):
     """ Process L{Types} objects and create the schema collection """
     container = SchemaCollection(self)
     for t in [t for t in self.types if t.local()]:
         for r in t.contents():
             entry = (r, self)
             container.add(entry)
     if not len(container): # empty
         r = Element.buildPath(self.root, 'types/schema')
         entry = (r, self)
         container.add(entry)
     self.schema = container.load()
     for s in [t.schema() for t in self.types if t.imported()]:
         self.schema.merge(s)
     return self.schema
예제 #4
0
파일: wsdl.py 프로젝트: ovnicraft/suds
 def build_schema(self):
     """Process L{Types} objects and create the schema collection."""
     container = SchemaCollection(self)
     for t in [t for t in self.types if t.local()]:
         for root in t.contents():
             schema = Schema(root, self.url, self.options, container)
             container.add(schema)
     if not len(container):
         root = Element.buildPath(self.root, "types/schema")
         schema = Schema(root, self.url, self.options, container)
         container.add(schema)
     self.schema = container.load(self.options)
     for s in [t.schema() for t in self.types if t.imported()]:
         self.schema.merge(s)
     return self.schema
예제 #5
0
파일: wsdl.py 프로젝트: ziaa/suds-jurko
 def build_schema(self):
     """Process L{Types} objects and create the schema collection."""
     loaded_schemata = {}
     container = SchemaCollection(self)
     for t in (t for t in self.types if t.local()):
         for root in t.contents():
             schema = Schema(root, self.url, self.options, loaded_schemata, container)
             container.add(schema)
     if not container:
         root = Element.buildPath(self.root, "types/schema")
         schema = Schema(root, self.url, self.options, loaded_schemata, container)
         container.add(schema)
     self.schema = container.load(self.options, loaded_schemata)
     #TODO: Recheck this XSD schema merging. XSD schema imports are not
     # supposed to be transitive. They only allow the importing schema to
     # reference entities from the imported schema, but do not include them
     # as their own content.
     for s in (t.schema() for t in self.types if t.imported()):
         self.schema.merge(s)
     return self.schema