Flowdock
method

rpcdefinedtype

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: WSDL::SOAP::MethodDefCreator
rpcdefinedtype(part) private

No documentation

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

Hide source
# File lib/wsdl/soap/methodDefCreator.rb, line 122
  def rpcdefinedtype(part)
    if mapped = basetype_mapped_class(part.type)
      ['::' + mapped.name]
    elsif definedtype = @simpletypes[part.type]
      ['::' + basetype_mapped_class(definedtype.base).name]
    elsif definedtype = @elements[part.element]
      #['::SOAP::SOAPStruct', part.element.namespace, part.element.name]
      ['nil', part.element.namespace, part.element.name]
    elsif definedtype = @complextypes[part.type]
      case definedtype.compoundtype
      when :TYPE_STRUCT, :TYPE_EMPTY    # ToDo: empty should be treated as void.
        type = create_class_name(part.type)
        [type, part.type.namespace, part.type.name]
      when :TYPE_MAP
        [Hash.name, part.type.namespace, part.type.name]
      when :TYPE_ARRAY
        arytype = definedtype.find_arytype || XSD::AnyTypeName
        ns = arytype.namespace
        name = arytype.name.sub(/\[(?:,)*\]$/, '')
        type = create_class_name(XSD::QName.new(ns, name))
        [type + '[]', ns, name]
      else
        raise NotImplementedError.new("must not reach here")
      end
    else
      raise RuntimeError.new("part: #{part.name} cannot be resolved")
    end
  end
Register or log in to add new notes.