summaryrefslogtreecommitdiff
path: root/lib/soap/rpc
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/soap/rpc
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/soap/rpc')
-rw-r--r--lib/soap/rpc/driver.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/soap/rpc/driver.rb b/lib/soap/rpc/driver.rb
index e6ca3f39d3..dd433ca33f 100644
--- a/lib/soap/rpc/driver.rb
+++ b/lib/soap/rpc/driver.rb
@@ -82,12 +82,6 @@ class Driver
@servant = Servant__.new(self, endpoint_url, namespace)
@servant.soapaction = soapaction
@proxy = @servant.proxy
- if env_httpproxy = ::SOAP::Env::HTTP_PROXY
- @servant.options["protocol.http.proxy"] = env_httpproxy
- end
- if env_no_proxy = ::SOAP::Env::NO_PROXY
- @servant.options["protocol.http.no_proxy"] = env_no_proxy
- end
end
def inspect
@@ -144,8 +138,7 @@ private
@mapping_registry = nil
@soapaction = nil
@wiredump_file_base = nil
- @options = ::SOAP::Property.new
- set_options
+ @options = setup_options
@streamhandler = HTTPPostStreamHandler.new(endpoint_url,
@options["protocol.http"] ||= ::SOAP::Property.new)
@proxy = Proxy.new(@streamhandler, @soapaction)
@@ -244,14 +237,21 @@ private
end
end
- def set_options
- @options.add_hook("protocol.mandatorycharset") do |key, value|
+ def setup_options
+ if opt = Property.loadproperty(::SOAP::PropertyName)
+ opt = opt["client"]
+ end
+ opt ||= Property.new
+ opt.add_hook("protocol.mandatorycharset") do |key, value|
@proxy.mandatorycharset = value
end
- @options.add_hook("protocol.wiredump_file_base") do |key, value|
+ opt.add_hook("protocol.wiredump_file_base") do |key, value|
@wiredump_file_base = value
end
- @options["protocol.http.charset"] = XSD::Charset.encoding_label
+ opt["protocol.http.charset"] ||= XSD::Charset.encoding_label
+ opt["protocol.http.proxy"] ||= Env::HTTP_PROXY
+ opt["protocol.http.no_proxy"] ||= Env::NO_PROXY
+ opt
end
end
end