| Class | WSDL::Import |
| In: |
lib/wsdl/import.rb
|
| Parent: | Info |
| content | [R] | |
| location | [R] | |
| namespace | [R] |
# File lib/wsdl/import.rb, line 21
21: def initialize
22: super
23: @namespace = nil
24: @location = nil
25: @content = nil
26: @web_client = nil
27: end
# File lib/wsdl/import.rb, line 39
39: def parse_attr(attr, value)
40: case attr
41: when NamespaceAttrName
42: @namespace = value.source
43: if @content
44: @content.targetnamespace = @namespace
45: end
46: @namespace
47: when LocationAttrName
48: @location = URI.parse(value.source)
49: if @location.relative? and !parent.location.nil? and
50: !parent.location.relative?
51: @location = parent.location + @location
52: end
53: if root.importedschema.key?(@location)
54: @content = root.importedschema[@location]
55: else
56: root.importedschema[@location] = nil # placeholder
57: @content = import(@location)
58: if @content.is_a?(Definitions)
59: @content.root = root
60: if @namespace
61: @content.targetnamespace = @namespace
62: end
63: end
64: root.importedschema[@location] = @content
65: end
66: @location
67: else
68: nil
69: end
70: end
# File lib/wsdl/import.rb, line 29
29: def parse_element(element)
30: case element
31: when DocumentationName
32: o = Documentation.new
33: o
34: else
35: nil
36: end
37: end