Forum: Ruby Dash in SOAP variable name

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.
luk a. (Guest)
on 2007-07-31 14:12
Hello,

First the code of my little script. I am trying to get some infromation
from other service using SOAP.

The code:

require 'soap/wsdlDriver'
wsdl = "http://some.service.com?wsdl"
service = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
service.doSomeMethod(1,1,1)

---
The "doSomeMethod" reqiuires 3 parameters but the name of the parameters
contains dash "-" char. And I get following error executing
"doSomeMethod":

ERROR: NameError: `@some-varname' is not allowed as an instance variable
name

Can anyone help me solving the problem ? I tried to find some solution
but I lost my hope :)

Thank you in advance,
Lukasz
John L. (Guest)
on 2007-07-31 14:55
(Received via mailing list)
Hi,

sounds like you might have found a bug in the soap library.

as a work around, is there a "document" version of the soap call
available?

something like:

service.doSomeMethod({"some-varname" => "value", "var2" => "value"})

John.
--
http://johnleach.co.uk
luk a. (Guest)
on 2007-07-31 15:09
> something like:
>
> service.doSomeMethod({"some-varname" => "value", "var2" => "value"})

nope. unfortunately it gives wrong number of arguments (1 for 3)
(ArgumentError)

too bad :(

lukasz
dima (Guest)
on 2007-07-31 17:27
(Received via mailing list)
On Jul 31, 1:09 pm, luk asz <removed_email_address@domain.invalid> wrote:
>
> --
> Posted viahttp://www.ruby-forum.com/.

You should post your question to http://groups.google.com/group/soap4r
luk a. (Guest)
on 2007-07-31 17:45
dima wrote:
> You should post your question to http://groups.google.com/group/soap4r

I've done it already.

Greetings,
Lukasz
This topic is locked and can not be replied to.