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, SOAPNamespaceTag, SOAPProxy, TypeMap, VERSION, ValueArray, ValueArrayName, XSDNamespaceTag, XSINamespaceTag

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

Returns a new instance of HTTPStreamHandler.



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

def initialize(options)
  super()
  @client = Client.new(nil, "RUBYJEDI-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.



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

def client
  @client
end

#wiredump_file_baseObject

Returns the value of attribute wiredump_file_base.



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

def wiredump_file_base
  @wiredump_file_base
end

Class Method Details

.create(options) ⇒ Object



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

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

Instance Method Details

#accept_encoding_gzip=(allow) ⇒ Object



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

def accept_encoding_gzip=(allow)
  @accept_encoding_gzip = allow
end

#inspectObject



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

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

#reset(url = nil) ⇒ Object



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

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



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

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



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

def test_loopback_response
  @client.test_loopback_response
end