public Method

SOAPGenerator.encode_element(ns, obj, parent)

There's no documentation for this item.

Source Code

# File 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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.