PHP 8.2.31
Preview: import.rb Size: 1.67 KB
/proc/thread-self/root/opt/alt/ruby18/lib64/ruby/1.8/wsdl/import.rb

# WSDL4R - WSDL import definition.
# Copyright (C) 2002, 2003  NAKAMURA, Hiroshi <nahi@ruby-lang.org>.

# This program is copyrighted free software by NAKAMURA, Hiroshi.  You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later version.


require 'wsdl/info'
require 'wsdl/importer'


module WSDL


class Import < Info
  attr_reader :namespace
  attr_reader :location
  attr_reader :content

  def initialize
    super
    @namespace = nil
    @location = nil
    @content = nil
    @web_client = nil
  end

  def parse_element(element)
    case element
    when DocumentationName
      o = Documentation.new
      o
    else
      nil
    end
  end

  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

private

  def import(location)
    Importer.import(location, root)
  end
end


end

Directory Contents

Dirs: 2 × Files: 18

Name Size Perms Modified Actions
soap DIR
- drwxr-xr-x 2024-03-03 22:48:14
Edit Download
xmlSchema DIR
- drwxr-xr-x 2024-03-03 22:48:14
Edit Download
1.21 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
2.30 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
5.21 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
577 B lrw-r--r-- 2007-02-12 23:01:19
Edit Download
1.67 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
825 B lrw-r--r-- 2007-02-12 23:01:19
Edit Download
816 B lrw-r--r-- 2007-02-12 23:01:19
Edit Download
936 B lrw-r--r-- 2007-02-12 23:01:19
Edit Download
2.55 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
1.95 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
1.65 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
3.89 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
924 B lrw-r--r-- 2007-02-12 23:01:19
Edit Download
1.60 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
1.39 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
1.09 KB lrw-r--r-- 2007-02-12 23:01:19
Edit Download
728 B lrw-r--r-- 2007-02-12 23:01:19
Edit Download
525 B lrw-r--r-- 2007-02-12 23:01:19
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).