class Savon::LocalOptions
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
Savon::Options::new
# File lib/savon/options.rb, line 270 def initialize(options = {}) @option_type = :local defaults = { :advanced_typecasting => true, :response_parser => :nokogiri, :multipart => false } super defaults.merge(options) end
Public Instance Methods
advanced_typecasting(advanced)
click to toggle source
Instruct Nori to use advanced typecasting.
# File lib/savon/options.rb, line 321 def advanced_typecasting(advanced) @options[:advanced_typecasting] = advanced end
attributes(attributes)
click to toggle source
Attributes for the SOAP message tag.
# File lib/savon/options.rb, line 301 def attributes(attributes) @options[:attributes] = attributes end
message(message)
click to toggle source
The SOAP message to send. Expected to be a Hash or a String.
# File lib/savon/options.rb, line 290 def message(message) @options[:message] = message end
message_tag(message_tag)
click to toggle source
SOAP message tag (formerly known as SOAP input tag). If it’s not set, Savon
retrieves the name from the WSDL document (if available). Otherwise, Gyoku converts the operation name into an XML element.
# File lib/savon/options.rb, line 296 def message_tag(message_tag) @options[:message_tag] = message_tag end
multipart(multipart)
click to toggle source
Instruct Savon
to create a multipart response if available.
# File lib/savon/options.rb, line 331 def multipart(multipart) @options[:multipart] = multipart end
response_parser(parser)
click to toggle source
Instruct Nori to use :rexml or :nokogiri to parse the response.
# File lib/savon/options.rb, line 326 def response_parser(parser) @options[:response_parser] = parser end
soap_action(soap_action)
click to toggle source
Value of the SOAPAction HTTP header.
# File lib/savon/options.rb, line 306 def soap_action(soap_action) @options[:soap_action] = soap_action end
soap_header(header)
click to toggle source
The local SOAP header. Expected to be a Hash or respond to to_s. Will be merged with the global SOAP header if both are Hashes. Otherwise the local option will be prefered.
# File lib/savon/options.rb, line 285 def soap_header(header) @options[:soap_header] = header end
xml(xml)
click to toggle source
The SOAP request XML to send. Expected to be a String.
# File lib/savon/options.rb, line 316 def xml(xml) @options[:xml] = xml end