Artem Tambovskiy
2008-Apr-08 07:01 UTC
Design question: working with data from external source
Hello, Could someone give an idea to Rails newbie? I''ve a need to do a SOAP query against remote server in my RoR application. As result of SOAP query array of strings (or hash)will be returned. But the question: how do I pass this array/hash to View if I''m doing SOAP call from the Controller? Or Controller isn''t a good place for external call code? Regards, Artem -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Julian Leviston
2008-Apr-08 08:03 UTC
Re: Design question: working with data from external source
What do you want to do with the data that you get from the SOAP query? It depends what librar(ies) you''re using to get the SOAP data. The best thing is to get the results, and use some breakpointer code, and inspect the result of the SOAP query and see what type of object and what messages you can send it. Julian. Learn Ruby on Rails! Check out the FREE VIDS (for a limited time) VIDEO #3 out NOW! http://sensei.zenunit.com/ On 08/04/2008, at 5:01 PM, Artem Tambovskiy wrote:> > Hello, > > Could someone give an idea to Rails newbie? > I''ve a need to do a SOAP query against remote server in my RoR > application. As result of SOAP query array of strings (or hash)will be > returned. > But the question: how do I pass this array/hash to View if I''m doing > SOAP call from the Controller? Or Controller isn''t a good place for > external call code? > > Regards, > Artem > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Artem Tambovskiy
2008-Apr-08 08:22 UTC
Re: Design question: working with data from external source
I''m using SOAP4R (ver 1.5.8) as interface and Hpricot to parse the server response (the server responds with data in XML format). So I''ll have a number String values as result of parsing data, which I need represent the data received from server as table in certain view. Julian Leviston wrote:> What do you want to do with the data that you get from the SOAP query? > > It depends what librar(ies) you''re using to get the SOAP data. > > The best thing is to get the results, and use some breakpointer code, > and inspect the result of the SOAP query and see what type of object > and what messages you can send it. >-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Julian Leviston
2008-Apr-08 08:56 UTC
Re: Design question: working with data from external source
Okay. You sound like you know what''s going on then. Julian. Learn Ruby on Rails! Check out the FREE VIDS (for a limited time) VIDEO #3 out NOW! http://sensei.zenunit.com/ On 08/04/2008, at 6:22 PM, Artem Tambovskiy wrote:> > I''m using SOAP4R (ver 1.5.8) as interface and Hpricot to parse the > server response (the server responds with data in XML format). So I''ll > have a number String values as result of parsing data, which I need > represent the data received from server as table in certain view. > > > Julian Leviston wrote: >> What do you want to do with the data that you get from the SOAP >> query? >> >> It depends what librar(ies) you''re using to get the SOAP data. >> >> The best thing is to get the results, and use some breakpointer code, >> and inspect the result of the SOAP query and see what type of object >> and what messages you can send it. >> > > > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You do it in the same way that you''d do it if it were data from an ActiveRecord model: @results = ...SOAP4R results.... On Apr 8, 3:01 am, Artem Tambovskiy <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hello, > > Could someone give an idea to Rails newbie? > I''ve a need to do a SOAP query against remote server in my RoR > application. As result of SOAP query array of strings (or hash)will be > returned. > But the question: how do I pass this array/hash to View if I''m doing > SOAP call from the Controller? Or Controller isn''t a good place for > external call code? > > Regards, > Artem > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---