summaryrefslogtreecommitdiff
path: root/lib/wsdl
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-05 13:26:26 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-05 13:26:26 +0000
commit1ed39b739237bffd9c78e696c09462ce67017b95 (patch)
tree032499118c88146a86aede2d89fa707bb242edc7 /lib/wsdl
parent3be09a4f4ffee94601051c37e5303b9546d816e1 (diff)
* lib/soap/netHttpClient.rb: proxy support did not work. fixed.
* lib/soap/property.rb: add class methods for loading property from stream/file/propertyfile. propertyfile is a file which is located at somedir in $:. * lib/soap/soap.rb, lib/soap/wsdlDriver.rb, lib/soap/rpc/driver.rb, lib/wsdl/importer.rb: load property from propertyfile 'soap/property' e.g. /usr/local/lib/ruby/site_ruby/1.8/soap/property. * test/soap/test_property.rb, test/soap/test_streamhandler.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/wsdl')
-rw-r--r--lib/wsdl/importer.rb13
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