Class: SOAP::HTTPStreamHandler

Inherits:
StreamHandler show all
Includes:
SOAP
Defined in:
lib/soap/streamHandler.rb

Defined Under Namespace

Classes: HttpPostRequestFilter

Constant Summary collapse

MAX_RETRY_COUNT =
times
10

Constants included from SOAP

AttrActor, AttrActorName, AttrArrayType, AttrArrayTypeName, AttrEncodingStyle, AttrEncodingStyleName, AttrHref, AttrHrefName, AttrId, AttrIdName, AttrMustUnderstand, AttrMustUnderstandName, AttrOffset, AttrOffsetName, AttrPosition, AttrPositionName, AttrRoot, AttrRootName, Base64Literal, EleBody, EleBodyName, EleEnvelope, EleEnvelopeName, EleFault, EleFaultActor, EleFaultActorName, EleFaultCode, EleFaultCodeName, EleFaultDetail, EleFaultDetailName, EleFaultName, EleFaultString, EleFaultStringName, EleHeader, EleHeaderName, EncodingNamespace, EnvelopeNamespace, LiteralNamespace, MediaType, NextActor, PropertyName, SOAPProxy, TypeMap, VERSION, ValueArray, ValueArrayName

Constants inherited from StreamHandler

StreamHandler::RUBY_VERSION_STRING

Instance Attribute Summary collapse

Attributes inherited from StreamHandler

#filterchain

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from StreamHandler

create_media_type, parse_media_type, #set_wiredump_file_base

Constructor Details

#initialize(options) ⇒ HTTPStreamHandler


143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/soap/streamHandler.rb', line 143

def initialize(options)
  super()
  @client = Client.new(nil, "SOAP4R/#{ Version }")
  if @client.respond_to?(:request_filter)
    @client.request_filter << HttpPostRequestFilter.new(@filterchain)
  end
  @wiredump_file_base = nil
  @charset = @wiredump_dev = nil
  @options = options
  set_options
  @client.debug_dev = @wiredump_dev
  @cookie_store = nil
  @accept_encoding_gzip = false
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client


134
135
136
# File 'lib/soap/streamHandler.rb', line 134

def client
  @client
end

#wiredump_file_baseObject

Returns the value of attribute wiredump_file_base


135
136
137
# File 'lib/soap/streamHandler.rb', line 135

def wiredump_file_base
  @wiredump_file_base
end

Class Method Details

.create(options) ⇒ Object


139
140
141
# File 'lib/soap/streamHandler.rb', line 139

def self.create(options)
  new(options)
end

Instance Method Details

#accept_encoding_gzip=(allow) ⇒ Object


162
163
164
# File 'lib/soap/streamHandler.rb', line 162

def accept_encoding_gzip=(allow)
  @accept_encoding_gzip = allow
end

#inspectObject


166
167
168
# File 'lib/soap/streamHandler.rb', line 166

def inspect
  "#<#{self.class}>"
end

#reset(url = nil) ⇒ Object


176
177
178
179
180
181
182
183
# File 'lib/soap/streamHandler.rb', line 176

def reset(url = nil)
  if url.nil?
    @client.reset_all
  else
    @client.reset(url)
  end
  @client.save_cookie_store if @cookie_store
end

#send(url, conn_data, charset = @charset) ⇒ Object


170
171
172
173
174
# File 'lib/soap/streamHandler.rb', line 170

def send(url, conn_data, charset = @charset)
  conn_data = send_post(url, conn_data, charset)
  @client.save_cookie_store if @cookie_store
  conn_data
end

#test_loopback_responseObject


158
159
160
# File 'lib/soap/streamHandler.rb', line 158

def test_loopback_response
  @client.test_loopback_response
end