Class: SOAP::Mapping::TypedArrayFactory_

Class | SOAP::Mapping::TypedArrayFactory_
In: | soap/mapping/factory.rb
Parent: | Factory

### Methods

new obj2soap soap2obj

### Public Class methods

new(allow_original_mapping = false)

[Source]

    # File soap/mapping/factory.rb, line 242
      def initialize(allow_original_mapping = false)
        super()
        @allow_original_mapping = allow_original_mapping
      end

### Public Instance methods

obj2soap(soap_class, obj, info, map)

[Source]

    # File soap/mapping/factory.rb, line 247
      def obj2soap(soap_class, obj, info, map)
        if !@allow_original_mapping and !obj.instance_variables.empty?
          return nil
        end
        arytype = info[:type] || info[0]
        soap_obj = SOAPArray.new(ValueArrayName, 1, arytype)
        mark_marshalled_obj(obj, soap_obj)
        obj.each do |var|
          soap_obj.add(Mapping._obj2soap(var, map))
        end
        soap_obj
      end

soap2obj(obj_class, node, info, map)

[Source]

    # File soap/mapping/factory.rb, line 260
      def soap2obj(obj_class, node, info, map)
        if node.rank > 1
          return false
        end
        arytype = info[:type] || info[0]
        unless node.arytype == arytype
          return false
        end
        obj = Mapping.create_empty_object(obj_class)
        mark_unmarshalled_obj(node, obj)
        node.soap2array(obj) do |elem|
          elem ? Mapping._soap2obj(elem, map) : nil
        end
        return true, obj
      end

[Validate]