Flowdock
method

encode_element

Importance_0
v1_8_7_72 - Show latest stable - 0 notes - Class: SOAP::SOAPGenerator
encode_element(ns, obj, parent) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/soap/generator.rb, line 110
  def encode_element(ns, obj, parent)
    attrs = {}
    if obj.is_a?(SOAPBody)
      @reftarget = obj
      obj.encode(self, ns, attrs) do |child|
        indent_backup, @indent = @indent, @indent + @indentstr
        encode_data(ns.clone_ns, child, obj)
        @indent = indent_backup
      end
      @reftarget = nil
    else
      if obj.is_a?(SOAPEnvelope)
        # xsi:nil="true" can appear even if dumping without explicit type.
        SOAPGenerator.assign_ns(attrs, ns,
          XSD::InstanceNamespace, XSINamespaceTag)
        if @generate_explicit_type
          SOAPGenerator.assign_ns(attrs, ns, XSD::Namespace, XSDNamespaceTag)
        end
      end
      obj.encode(self, ns, attrs) do |child|
        indent_backup, @indent = @indent, @indent + @indentstr
        encode_data(ns.clone_ns, child, obj)
        @indent = indent_backup
      end
    end
  end
Register or log in to add new notes.