Forum: Ruby on Rails ActiveRecord and SOAP

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
C21ccd7a22dc14980e3cc9cb5cf2dcef?d=identicon&s=25 slava (Guest)
on 2009-03-18 21:42
(Received via mailing list)
I need to get some of the data for my models from SOAP based services
and some from a rails db. I am relatively new to Rails and not sure
how to do it right.

class Product < ActiveRecord::Base   # products should be loaded
through a soap service from a 3rd party system
  belongs_to :product_group              # also loaded through a soap
  belongs_to :product_location           # this one is a local table

Product.find(params[:id])                 #should load data from both
soap service and local db

please suggest how this should be done. thank you.
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-03-18 23:11
(Received via mailing list)
On Mar 18, 8:42 pm, slava <> wrote:
> Product.find(params[:id])                 #should load data from both
> soap service and local db

ActiveRecord can't do this. ActiveResource sort of does this for data
from appropriate RESTful apis, but it doesn't do associations. You'd
need to keep all of the data locally as far as I can tell.

C21ccd7a22dc14980e3cc9cb5cf2dcef?d=identicon&s=25 slava (Guest)
on 2009-03-18 23:15
(Received via mailing list)
I understand that ActiveRecord can't do this be default. But I need
this to work, so I will have to modify default behaviour. Please
suggest an appropriate route. Do I overwrite
find method? do I use something else entirely? I need this to work


On Mar 18, 3:10 pm, Frederick Cheung <>
This topic is locked and can not be replied to.