diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-20 13:50:15 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-20 13:50:15 +0000 |
commit | 7d163a29ec5458eb8e02ef3de8d7aece2be1f59e (patch) | |
tree | b56a6e784df74331c28e4a94901b96837f214e35 /lib/soap/netHttpClient.rb | |
parent | 1d25ffca9e45da9bcd4eeef08a4594d6ad47d69b (diff) | |
download | ruby-7d163a29ec5458eb8e02ef3de8d7aece2be1f59e.tar.gz ruby-7d163a29ec5458eb8e02ef3de8d7aece2be1f59e.tar.xz ruby-7d163a29ec5458eb8e02ef3de8d7aece2be1f59e.zip |
* added files:
* lib/soap/mapping/wsdl*.rb
* lib/wsdl/soap/element.rb
* lib/wsdl/xmlSchema/simpleContent.rb
* modified files:
* lib/soap/*
* lib/wsdl/*
* lib/xsd/*
* test/soap/*
* test/wsdl/*
* test/xsd/*
* summary
* imported from the soap4r repository. Version: 1.5.3-ruby1.8.2
* added several XSD basetype support: nonPositiveInteger,
negativeInteger, nonNegativeInteger, unsignedLong, unsignedInt,
unsignedShort, unsignedByte, positiveInteger
* HTTP client connection/send/receive timeout support.
* HTTP client/server gzipped content encoding support.
* improved WSDL schema definition support; still is far from
complete, but is making step by step improovement.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/soap/netHttpClient.rb')
-rw-r--r-- | lib/soap/netHttpClient.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/soap/netHttpClient.rb b/lib/soap/netHttpClient.rb index 1e9d71c5a..5b16a5b44 100644 --- a/lib/soap/netHttpClient.rb +++ b/lib/soap/netHttpClient.rb @@ -26,13 +26,17 @@ class NetHttpClient attr_accessor :debug_dev attr_accessor :ssl_config # ignored for now. attr_accessor :protocol_version # ignored for now. + attr_accessor :connect_timeout + attr_accessor :send_timeout # ignored for now. + attr_accessor :receive_timeout def initialize(proxy = nil, agent = nil) @proxy = proxy ? URI.parse(proxy) : nil @agent = agent @debug_dev = nil @session_manager = SessionManager.new - @no_proxy = nil + @no_proxy = @ssl_config = @protocol_version = nil + @connect_timeout = @send_timeout = @receive_timeout = nil end def test_loopback_response @@ -55,6 +59,7 @@ class NetHttpClient def set_basic_auth(uri, user_id, passwd) # net/http does not handle url. @basic_auth = [user_id, passwd] + raise NotImplementedError.new("basic_auth is not supported under soap4r + net/http.") end def set_cookie_store(filename) @@ -99,7 +104,7 @@ private http = create_connection(url) response = nil http.start { |worker| - response, = yield(worker) + response = yield(worker) worker.finish } @debug_dev << response.body if @debug_dev @@ -116,6 +121,8 @@ private if http.respond_to?(:set_debug_output) http.set_debug_output(@debug_dev) end + http.open_timeout = @connect_timeout if @connect_timeout + http.read_timeout = @receive_timeout if @receive_timeout case url when URI::HTTPS if SSLEnabled |