Forum: Ruby Soap add_method

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5896cb49b1b972647009cf4f0b110852?d=identicon&s=25 Justin Mazzi (jmazzi)
on 2007-02-22 21:25
Is there a way to set default arguments for soap methods?

i.e.

proxy.add_method('value1','value2'='something')



I need to pass a long a username and password with each soap call.
please let me know, thanks!
5896cb49b1b972647009cf4f0b110852?d=identicon&s=25 Justin Mazzi (jmazzi)
on 2007-02-22 21:28
Justin Mazzi wrote:
> Is there a way to set default arguments for soap methods?
>
> i.e.
>
> proxy.add_method('value1','value2'='something')
>
>
>
> I need to pass a long a username and password with each soap call.
> please let me know, thanks!

I would also like to add, this is not Basic auth(http auth). This is
simple passing a variable called username and password with each call.
96931bfe0c2948f47a98e15ae52e5637?d=identicon&s=25 Chris Carter (cdcarter)
on 2007-02-22 23:19
(Received via mailing list)
On 2/22/07, Justin Mazzi <jmazzi@gmail.com> wrote:
>
> --
> Posted via http://www.ruby-forum.com/.
>
>
Hi Justin, I don't know exactly how SOAP4R handles this, but you could
add the method normally, and writte a wrapper to call the method with
the attributes:
class << soap_object
  def really_cool_method(*args)
    self.cool_method(:value1 => "blah, args)
  end
end
This topic is locked and can not be replied to.