# File soap/mapping/factory.rb, line 278
def obj2soap(soap_class, obj, info, map)
type = info[:type] || info[0]
soap_obj = soap_class.new(type)
mark_marshalled_obj(obj, soap_obj)
if obj.class <= SOAP::Marshallable
setiv2soap(soap_obj, obj, map)
else
setiv2soap(soap_obj, obj, map)
end
soap_obj
end
# File soap/mapping/factory.rb, line 290
def soap2obj(obj_class, node, info, map)
type = info[:type] || info[0]
unless node.type == type
return false
end
obj = Mapping.create_empty_object(obj_class)
mark_unmarshalled_obj(node, obj)
setiv2obj(obj, node, map)
return true, obj
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.