diff options
Diffstat (limited to 'lib/wsdl')
-rw-r--r-- | lib/wsdl/importer.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/wsdl/importer.rb b/lib/wsdl/importer.rb index df354311a1..fac02b51a0 100644 --- a/lib/wsdl/importer.rb +++ b/lib/wsdl/importer.rb @@ -9,6 +9,7 @@ require 'wsdl/info' require 'wsdl/parser' require 'soap/soap' +require 'soap/property' module WSDL @@ -29,15 +30,15 @@ class Importer content = File.open(location).read else client = web_client.new(nil, "WSDL4R") - if env_httpproxy = ::SOAP::Env::HTTP_PROXY - client.proxy = env_httpproxy - end - if env_no_proxy = ::SOAP::Env::NO_PROXY - client.no_proxy = env_no_proxy + if opt = ::SOAP::Property.loadproperty(::SOAP::PropertyName) + client.proxy = opt["client.protocol.http.proxy"] + client.no_proxy = opt["client.protocol.http.no_proxy"] end + client.proxy ||= ::SOAP::Env::HTTP_PROXY + client.no_proxy ||= ::SOAP::Env::NO_PROXY content = client.get_content(location) end - opt = {} # charset? + opt = {} begin WSDL::Parser.new(opt).parse(content) rescue WSDL::Parser::ParseError => orgexcn |