Flowdock
method

decode_soap_envelope

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: SOAP::Parser
decode_soap_envelope(ns, ele, attrs, parent) private

No documentation

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

Hide source
# File lib/soap/parser.rb, line 206
  def decode_soap_envelope(ns, ele, attrs, parent)
    o = nil
    if ele.name == EleEnvelope
      o = SOAPEnvelope.new
      if ext = @opt[:external_content]
        ext.each do |k, v|
          o.external_content[k] = v
        end
      end
    elsif ele.name == EleHeader
      unless parent.node.is_a?(SOAPEnvelope)
        raise FormatDecodeError.new("Header should be a child of Envelope.")
      end
      o = SOAPHeader.new
      parent.node.header = o
    elsif ele.name == EleBody
      unless parent.node.is_a?(SOAPEnvelope)
        raise FormatDecodeError.new("Body should be a child of Envelope.")
      end
      o = SOAPBody.new
      parent.node.body = o
    elsif ele.name == EleFault
      unless parent.node.is_a?(SOAPBody)
        raise FormatDecodeError.new("Fault should be a child of Body.")
      end
      o = SOAPFault.new
      parent.node.fault = o
    end
    o
  end
Register or log in to add new notes.