summaryrefslogtreecommitdiff
path: root/lib/soap/wsdlDriver.rb
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/wsdlDriver.rb
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/wsdlDriver.rb')
-rw-r--r--lib/soap/wsdlDriver.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/soap/wsdlDriver.rb b/lib/soap/wsdlDriver.rb
index 3931c7c514..0961751474 100644
--- a/lib/soap/wsdlDriver.rb
+++ b/lib/soap/wsdlDriver.rb
@@ -132,12 +132,6 @@ class WSDLDriver
def initialize(wsdl, port, logdev)
@servant = Servant__.new(self, wsdl, port, logdev)
- if env_httpproxy = ::SOAP::Env::HTTP_PROXY
- @servant.options["protocol.http.proxy"] = env_httpproxy
- end
- if env_httpproxy = ::SOAP::Env::NO_PROXY
- @servant.options["protocol.http.no_proxy"] = env_httpproxy
- end
end
def inspect
@@ -171,8 +165,7 @@ class WSDLDriver
@port = port
@logdev = logdev
- @options = ::SOAP::Property.new
- set_options
+ @options = setup_options
@mapping_registry = nil # for rpc unmarshal
@wsdl_mapping_registry = nil # for rpc marshal
@default_encodingstyle = EncodingNamespace
@@ -189,7 +182,7 @@ class WSDLDriver
@doc_mapper = Mapper.new(@wsdl_elements, @wsdl_types)
endpoint_url = @port.soap_address.location
@streamhandler = HTTPPostStreamHandler.new(endpoint_url,
- @options["protocol.http"] ||= ::SOAP::Property.new)
+ @options["protocol.http"] ||= Property.new)
# Convert a map which key is QName, to a Hash which key is String.
@operations = {}
@port.inputoperation_map.each do |op_name, op_info|
@@ -402,14 +395,21 @@ class WSDLDriver
@logdev.add(sev, nil, self.class) { yield } if @logdev
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|
@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
class Mapper