method
decode_defined_complextype
ruby latest stable - Class:
SOAP::EncodingStyle::SOAPHandler
decode_defined_complextype(elename, typename, typedef, arytypestr)private
No documentation available.
# File lib/soap/encodingstyle/soapHandler.rb, line 390
def decode_defined_complextype(elename, typename, typedef, arytypestr)
case typedef.compoundtype
when :TYPE_STRUCT, :TYPE_MAP
o = SOAPStruct.decode(elename, typename)
o.definedtype = typedef
return o
when :TYPE_ARRAY
expected_arytype = typedef.find_arytype
if arytypestr
actual_arytype = XSD::QName.new(expected_arytype.namespace,
content_typename(expected_arytype.name) <<
content_ranksize(arytypestr))
o = SOAPArray.decode(elename, typename, actual_arytype)
else
o = SOAPArray.new(typename, 1, expected_arytype)
o.elename = elename
end
o.definedtype = typedef
return o
when :TYPE_EMPTY
o = SOAPNil.decode(elename)
o.definedtype = typedef
return o
else
raise RuntimeError.new(
"Unknown kind of complexType: #{typedef.compoundtype}")
end
nil
end