Class | WSDL::Import
In: | wsdl/import.rb
Parent: | Info

### Methods

new parse_attr parse_element

### Attributes

content | [R] |
location | [R] |
namespace | [R] |

### Public Class methods

new()

[Source]

    # File wsdl/import.rb, line 21
      def initialize
        super
        @namespace = nil
        @location = nil
        @content = nil
        @web_client = nil
      end

### Public Instance methods

parse_attr(attr, value)

[Source]

    # File wsdl/import.rb, line 39
      def parse_attr(attr, value)
        case attr
        when NamespaceAttrName
          @namespace = value.source
          if @content
            @content.targetnamespace = @namespace
          end
          @namespace
        when LocationAttrName
          @location = URI.parse(value.source)
          if @location.relative? and !parent.location.nil? and
              !parent.location.relative?
            @location = parent.location + @location
          end
          if root.importedschema.key?(@location)
            @content = root.importedschema[@location]
          else
            root.importedschema[@location] = nil      # placeholder
            @content = import(@location)
            if @content.is_a?(Definitions)
              @content.root = root
              if @namespace
                @content.targetnamespace = @namespace
              end
            end
            root.importedschema[@location] = @content
          end
          @location
        else
          nil
        end
      end

parse_element(element)

[Source]

    # File wsdl/import.rb, line 29
      def parse_element(element)
        case element
        when DocumentationName
          o = Documentation.new
          o
        else
          nil
        end
      end

[Validate]