Hello everyone, I''m currently writing a Rails application which should expose some web methods, which need to be called by a windows mobile application. I''ve been able to successfully call some webmethods from the mobile application, but only the methods returning simple types as strings, numbers, arrays etc. Now I need to expose a method which receives an ActiveRecord object. In this case, I''ve witnessed a strange behaviour. If I write my method this way: def get_role(role_id) a = Role.find(role_id) return a end I get a "Cannot map Role to SOAP/OM" exception from the mobile application. Googling this error has lead me to this page: http://benrobb.com/2007/02/06/cannot-map-objtype-to-soapom/ so I rewrote the method as: def get_role(role_id) a = Role.find(role_id) return Role.new(:description => "#{a.description}", ......[all the attributes here]) end but in this case, the mobile application gives me a "FormatException" error. I cannot understand why, even if I''m returning a Role object in both cases, I get two different error messages! Where or what am I doing wrong? Thanks in advance! Regards, Rey9999 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---