Sha256: 871c8160cc457a9a1a67cdf82c41499877e5d1447e5dab4aa9b22cd19d0361be

Contents?: true

Size: 1.02 KB

Versions: 28

Compression:

Stored size: 1.02 KB

Contents

# warn "Patching WSDL::Import"

module WSDL
  class Import < Info
    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
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
yieldmanager-0.9.13 lib/wsdl/patch.rb
yieldmanager-0.9.12 lib/wsdl/patch.rb
yieldmanager-0.9.11 lib/wsdl/patch.rb
yieldmanager-0.9.10 lib/wsdl/patch.rb
yieldmanager-0.9.8 lib/wsdl/patch.rb
yieldmanager-0.9.7 lib/wsdl/patch.rb
yieldmanager-0.9.6 lib/wsdl/patch.rb
yieldmanager-0.9.5 lib/wsdl/patch.rb
yieldmanager-0.9.4 lib/wsdl/patch.rb
yieldmanager-0.9.3 lib/wsdl/patch.rb
yieldmanager-0.9.2 lib/wsdl/patch.rb
yieldmanager-0.9.1 lib/wsdl/patch.rb
yieldmanager-0.9.0 lib/wsdl/patch.rb
yieldmanager-0.8.6 lib/wsdl/patch.rb
yieldmanager-0.8.5 lib/wsdl/patch.rb
yieldmanager-0.8.4 lib/wsdl/patch.rb
yieldmanager-0.8.3 lib/wsdl/patch.rb
yieldmanager-0.8.2 lib/wsdl/patch.rb
yieldmanager-0.8.1 lib/wsdl/patch.rb
yieldmanager-0.8.0 lib/wsdl/patch.rb