Class: Savon::Builder
- Inherits:
-
Object
- Object
- Savon::Builder
- Defined in:
- lib/savon/builder.rb
Constant Summary collapse
- SCHEMA_TYPES =
{ "xmlns:xsd" => "http://www.w3.org/2001/XMLSchema", "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance" }
- SOAP_NAMESPACE =
{ 1 => "http://schemas.xmlsoap.org/soap/envelope/", 2 => "http://www.w3.org/2003/05/soap-envelope" }
Instance Method Summary collapse
-
#initialize(operation_name, wsdl, globals, locals) ⇒ Builder
constructor
A new instance of Builder.
- #to_s ⇒ Object
Constructor Details
#initialize(operation_name, wsdl, globals, locals) ⇒ Builder
Returns a new instance of Builder.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/savon/builder.rb', line 19 def initialize(operation_name, wsdl, globals, locals) @operation_name = operation_name @wsdl = wsdl @globals = globals @locals = locals @types = convert_type_definitions_to_hash @used_namespaces = convert_type_namespaces_to_hash end |
Instance Method Details
#to_s ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/savon/builder.rb', line 30 def to_s return @locals[:xml] if @locals.include? :xml tag(builder, :Envelope, namespaces) do |xml| tag(xml, :Header) { xml << header.to_s } unless header.empty? tag(xml, :Body) { xml.tag!(*) { xml << .to_s } } end end |