# File soap/mapping/factory.rb, line 20
def obj2soap(soap_class, obj, info, map)
raise NotImplementError.new
# return soap_obj
end
# File soap/mapping/factory.rb, line 30
def setiv2obj(obj, node, map)
return if node.nil?
if obj.is_a?(Array)
setiv2ary(obj, node, map)
else
setiv2struct(obj, node, map)
end
end
# File soap/mapping/factory.rb, line 39
def setiv2soap(node, obj, map)
if obj.class.class_variables.include?('@@schema_element')
obj.class.class_eval('@@schema_element').each do |name, info|
type, qname = info
if qname
elename = qname.name
else
elename = Mapping.name2elename(name)
end
node.add(elename,
Mapping._obj2soap(obj.instance_variable_get('@' + name), map))
end
else
# should we sort instance_variables?
obj.instance_variables.each do |var|
name = var.sub(/^@/, '')
elename = Mapping.name2elename(name)
node.add(elename,
Mapping._obj2soap(obj.instance_variable_get(var), map))
end
end
end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please see Improve the docs, or visit Documenting-ruby.org.