Files

Class Index [+]

Quicksearch

SOAP::Mapping::ArrayFactory_

Public Class Methods

new(allow_original_mapping = false) click to toggle source
     # File lib/soap/mapping/factory.rb, line 238
238:   def initialize(allow_original_mapping = false)
239:     super()
240:     @allow_original_mapping = allow_original_mapping
241:   end

Public Instance Methods

obj2soap(soap_class, obj, info, map) click to toggle source
[1], [2]

is converted to Array of Array, not 2-D Array.

To create M-D Array, you must call Mapping.ary2md.

     # File lib/soap/mapping/factory.rb, line 245
245:   def obj2soap(soap_class, obj, info, map)
246:     if !@allow_original_mapping and !obj.instance_variables.empty?
247:       return nil
248:     end
249:     arytype = Mapping.obj2element(obj)
250:     if arytype.name
251:       arytype.namespace ||= RubyTypeNamespace
252:     else
253:       arytype = XSD::AnyTypeName
254:     end
255:     soap_obj = SOAPArray.new(ValueArrayName, 1, arytype)
256:     mark_marshalled_obj(obj, soap_obj)
257:     obj.each do |item|
258:       soap_obj.add(Mapping._obj2soap(item, map))
259:     end
260:     soap_obj
261:   end
soap2obj(obj_class, node, info, map) click to toggle source
     # File lib/soap/mapping/factory.rb, line 263
263:   def soap2obj(obj_class, node, info, map)
264:     obj = Mapping.create_empty_object(obj_class)
265:     mark_unmarshalled_obj(node, obj)
266:     node.soap2array(obj) do |elem|
267:       elem ? Mapping._soap2obj(elem, map) : nil
268:     end
269:     return true, obj
270:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.