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

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/

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 L. 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.

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 T. [email protected]

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/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs