method
fetch

v1_8_6_287 -
Show latest stable
-
0 notes -
Class: WSDL::XMLSchema::Importer
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
fetch(location)
private
Hide source
# File lib/wsdl/xmlSchema/importer.rb, line 45 def fetch(location) warn("importing: #{location}") if $DEBUG content = nil if location.scheme == 'file' or (location.relative? and FileTest.exist?(location.path)) content = File.open(location.path).read elsif location.scheme and location.scheme.size == 1 and FileTest.exist?(location.to_s) # ToDo: remove this ugly workaround for a path with drive letter # (D://foo/bar) content = File.open(location.to_s).read else client = web_client.new(nil, "WSDL4R") client.proxy = ::SOAP::Env::HTTP_PROXY client.no_proxy = ::SOAP::Env::NO_PROXY if opt = ::SOAP::Property.loadproperty(::SOAP::PropertyName) ::SOAP::HTTPConfigLoader.set_options(client, opt["client.protocol.http"]) end content = client.get_content(location) end content end