SOAP on rails? Confused

Hi,

Ive been struggling with the SOAP client things to do with rails as I’m
not sure how to do what I need to do. So far I have:

class SOAPclient < SOAP::RPC::StandaloneServer
def on_init
setup = gui_controller.new
add_method(setup, “submit”)
end
end

server = SOAPclient.new(“http://127.0.0.1:3000”, “http://192.168.0.5”,
8080)
trap(‘INT’) { server.shutdown }
server.start

But I’ve no idea how to call that or if its anywhere near right? :S
Doesn’t seem to be any tutorials on this sortve stuff so getting very
lost!
Thanks alot,
Bex

On Wed, Jul 19, 2006 at 05:34:27PM +0200, Becky F. wrote:

Ive been struggling with the SOAP client things to do with rails as I’m
not sure how to do what I need to do. So far I have:

class SOAPclient < SOAP::RPC::StandaloneServer
^^^^^^ ^^^^^^

I’m fairly sure there’s some confusion about roles in your code.

But I’ve no idea how to call that or if its anywhere near right? :S
Doesn’t seem to be any tutorials on this sortve stuff so getting very
lost!

There’s not a lot, but there should be enough to let you work out how to
do
most things. Perhaps you could explain what exactly you’re trying to
do,
and people can give more specific help?

  • Matt

Hi, thanks for the reply.

I have a basic form in rhtml that I’m sending the contents of to a Java
class method via soap. So far I have the controller successfully
extracting the filled out forms contents properly, and not sure where to
go from there (I have about 3 weeks experience working with rails so
excuse the simple questions :D)

Thanks again, I hope that’s clearer,
Bex

On Thu, Jul 20, 2006 at 10:13:31AM +0200, Becky F. wrote:

Hi, thanks for the reply.

I have a basic form in rhtml that I’m sending the contents of to a Java
class method via soap. So far I have the controller successfully
extracting the filled out forms contents properly, and not sure where to
go from there (I have about 3 weeks experience working with rails so
excuse the simple questions :D)

Thanks again, I hope that’s clearer,

Not really, no. Your descriptions are pretty thin on useful detail,
like
what role each part of your system plays.

What I think you’re shooting for is something like so:

  • User requests a page via a Rails app, which contains a HTML form
    generated
    via rhtml;

  • User fills out form, submits it to another action in your Rails app
    for
    processing;

  • This action takes the values of the params array;

  • The values extracted from params need to be sent via a SOAP call to
    some
    sort of external service for further processing.

It’s this last step you’re getting hung up on, right? If so, the answer
to
that is pretty straight-forward – the Pickaxe has all the examples you
need
to make a straight-forward SOAP call. My PDF has it at page 237, but
the
whole SOAP and Web Services section is valuable to read if you’re
working in
this space.

If, of course, my description above is off-base, then you’ll need to
explain
what exactly you’re after. The point-by-point data flow is a good way
to
go.

  • Matt

On Thu, Jul 20, 2006 at 12:41:40PM +0200, Becky F. wrote:

That’s exactly it yeh. I’ve found tutorials like :

http://rails.techno-weenie.net/question/2006/2/2/how_do_i_upload_files_using_a_rails_web_service

That’s pretty different to what you’re trying to do. What probably
confused
you with that one is that the solution shows both a client portion (for
making the SOAP calls) and a server (for receiving the SOAP calls) when
all
you want is the client end.

but I’m not sure where the server and client parts fit in and whether
they’re called from a controller or how that works.

The controller code makes the call, yes.

PS. What pdf do you mean?

The PDF version of “Programming Ruby, 2nd Edition”, sometimes referred
to as
“the Pickaxe”. It’s an excellent reference manual for the Ruby
language,
and comes highly recommended by lots of people as The Book To Have for
anyone who’s going to be writing lots of Ruby. See
http://www.pragmaticprogrammer.com/titles/ruby/ for all the details.
I’ve
got both the hardcopy for home reference, and a PDF version for
“anywhere,
any time” access to all the gems of wisdom contained within it.

  • Matt

That’s exactly it yeh. I’ve found tutorials like :

http://rails.techno-weenie.net/question/2006/2/2/how_do_i_upload_files_using_a_rails_web_service

but I’m not sure where the server and client parts fit in and whether
they’re called from a controller or how that works.

Thanks for your help,

Bex

PS. What pdf do you mean?

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