From c9dc4ae58237c765f7e8089a05f63b5de6a2ae48 Mon Sep 17 00:00:00 2001 From: nahi Date: Thu, 4 Dec 2003 04:05:51 +0000 Subject: * lib/soap/soap.rb: add SOAP::Env module for environment repository such as HTTP_PROXY. * lib/soap/property.rb: property implementation. * lib/soap/streamHandler.rb, lib/soap/wsdlDriver.rb, lib/soap/rpc/driver.rb: use soap/property.rb. * lib/wsdl/importer.rb, lib/soap/wsdlDriver.rb, lib/soap/rpc/driver.rb: use SOAP::Env. * lib/soap/netHttpClient.rb: add basic_auth, ssl_config, and cookie management interface, but ignored for now. * lib/xsd/charset.rb: add XSD::Charset.encoding= interface to set wiredump charset explicitly. it was fixed to 'utf-8' when iconv or uconv module was found. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/soap/netHttpClient.rb | 60 ++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 24 deletions(-) (limited to 'lib/soap/netHttpClient.rb') diff --git a/lib/soap/netHttpClient.rb b/lib/soap/netHttpClient.rb index 04d193713..3eacdad69 100644 --- a/lib/soap/netHttpClient.rb +++ b/lib/soap/netHttpClient.rb @@ -24,39 +24,31 @@ class NetHttpClient attr_accessor :proxy attr_accessor :no_proxy attr_accessor :debug_dev - attr_reader :session_manager - - class SessionManager - attr_accessor :connect_timeout - attr_accessor :send_timeout - attr_accessor :receive_timeout - end - - class Response - attr_reader :content - attr_reader :status - attr_reader :reason - attr_reader :contenttype - - def initialize(res) - @status = res.code.to_i - @reason = res.message - @contenttype = res['content-type'] - @content = res.body - end - end + attr_accessor :ssl_config # ignored for now. + attr_accessor :protocol_version # ignored for now. def initialize(proxy = nil, agent = nil) @proxy = proxy ? URI.parse(proxy) : nil @agent = agent @debug_dev = nil @session_manager = SessionManager.new - name = 'no_proxy' - @no_proxy = ENV[name] || ENV[name.upcase] + @no_proxy = nil + end + + def set_basic_auth(uri, user_id, passwd) + # ignored for now. + end + + def set_cookie_store(filename) + # ignored for now. end def reset(url) - # ignored. + # ignored for now. + end + + def reset_all + # ignored for now. end def post(url, req_body, header = {}) @@ -134,6 +126,26 @@ private false end end + + class SessionManager + attr_accessor :connect_timeout + attr_accessor :send_timeout + attr_accessor :receive_timeout + end + + class Response + attr_reader :content + attr_reader :status + attr_reader :reason + attr_reader :contenttype + + def initialize(res) + @status = res.code.to_i + @reason = res.message + @contenttype = res['content-type'] + @content = res.body + end + end end -- cgit