method
obj2soap
v1.2.6 -
Show latest stable
- Class:
ActionWebService::Protocol::Soap::SoapActiveRecordStructFactory
obj2soap(soap_class, obj, info, map)public
No documentation available.
# File actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb, line 178
def obj2soap(soap_class, obj, info, map)
unless obj.is_a?(ActiveRecord::Base)
return nil
end
soap_obj = soap_class.new(obj.class.instance_variable_get('@qname'))
obj.class.columns.each do |column|
key = column.name.to_s
value = obj.send(key)
soap_obj[key] = SOAP::Mapping._obj2soap(value, map)
end
soap_obj
end