Load the object by opening the URL
(self, definitions)
| 305 | pmd.wrappers['imported'] = repr |
| 306 | |
| 307 | def load(self, definitions): |
| 308 | """ Load the object by opening the URL """ |
| 309 | url = self.location |
| 310 | log.debug('importing (%s)', url) |
| 311 | if '://' not in url: |
| 312 | url = urljoin(definitions.url, url) |
| 313 | options = definitions.options |
| 314 | d = Definitions(url, options) |
| 315 | if d.root.match(Definitions.Tag, wsdlns): |
| 316 | self.import_definitions(definitions, d) |
| 317 | return |
| 318 | if d.root.match(Schema.Tag, Namespace.xsdns): |
| 319 | self.import_schema(definitions, d) |
| 320 | return |
| 321 | raise Exception('document at "%s" is unknown' % url) |
| 322 | |
| 323 | def import_definitions(self, definitions, d): |
| 324 | """ import/merge wsdl definitions """ |
no test coverage detected