Flowdock
method

decode_tag_by_type

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: SOAP::EncodingStyle::SOAPHandler
decode_tag_by_type(ns, elename, typestr, parent, arytypestr, extraattr) private

No documentation

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

Hide source
# File lib/soap/encodingstyle/soapHandler.rb, line 420
  def decode_tag_by_type(ns, elename, typestr, parent, arytypestr, extraattr)
    if arytypestr
      type = typestr ? ns.parse(typestr) : ValueArrayName
      node = SOAPArray.decode(elename, type, ns.parse(arytypestr))
      node.extraattr.update(extraattr)
      return node
    end

    type = nil
    if typestr
      type = ns.parse(typestr)
    elsif parent.is_a?(SOAPArray)
      type = parent.arytype
    else
      # Since it's in dynamic(without any type) encoding process,
      # assumes entity as its type itself.
      #   <SOAP-ENC:Array ...> => type Array in SOAP-ENC.
      #   <Country xmlns="foo"> => type Country in foo.
      type = elename
    end

    if (klass = TypeMap[type])
      node = decode_basetype(klass, elename)
      node.extraattr.update(extraattr)
      return node
    end

    # Unknown type... Struct or String
    SOAPUnknown.new(self, elename, type, extraattr)
  end
Register or log in to add new notes.