1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/wsdl/xmlSchema/importer.rb (WSDL::XMLSchema::Importer#fetch): add

a workaround for importing an WSDL whose path begins with drive
          letter.  [ruby-dev:26242]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nahi 2005-08-20 15:14:35 +00:00
parent 38769c7d4a
commit c58a4a5032
2 changed files with 14 additions and 2 deletions

View file

@ -1,4 +1,10 @@
Sat Aug 20 2005 22:05:25 2005 K.Kosako <sndgk393 AT ybb.ne.jp>
Sun Aug 21 00:10:23 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
* lib/wsdl/xmlSchema/importer.rb (WSDL::XMLSchema::Importer#fetch): add
a workaround for importing an WSDL whose path begins with drive
letter. [ruby-dev:26242]
Sat Aug 20 22:05:25 2005 K.Kosako <sndgk393 AT ybb.ne.jp>
* regexec.c (code_is_in_cclass_node): check code size.
[ruby-dev:26840]

View file

@ -48,12 +48,18 @@ private
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"])
::SOAP::HTTPConfigLoader.set_options(client,
opt["client.protocol.http"])
end
content = client.get_content(location)
end