[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Dash in SOAP variable name

lukas Shb

7/31/2007 10:13:00 AM

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?...
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
--
Posted via http://www.ruby-....

4 Answers

John Leach

7/31/2007 10:55:00 AM

0

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://johnl...

On Tue, 2007-07-31 at 19:12 +0900, lukas Shb wrote:
> 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?...
> 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



lukas Shb

7/31/2007 11:09:00 AM

0

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

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

too bad :(

lukasz

--
Posted via http://www.ruby-....

Dejan Dimic

7/31/2007 1:24:00 PM

0

On Jul 31, 1:09 pm, luk asz <xsh...@gmail.com> wrote:
> > something like:
>
> > service.doSomeMethod({"some-varname" => "value", "var2" => "value"})
>
> nope. unfortunately it gives wrong number of arguments (1 for 3)
> (ArgumentError)
>
> too bad :(
>
> lukasz
>
> --
> Posted viahttp://www.ruby-....

You should post your question to http://groups.google.com/gr...

lukas Shb

7/31/2007 1:46:00 PM

0

dima wrote:
> You should post your question to http://groups.google.com/gr...

I've done it already.

Greetings,
Lukasz
--
Posted via http://www.ruby-....