# Dash in SOAP variable name

**URL:** <https://www.ruby-forum.com/t/dash-in-soap-variable-name/110831>\
**Category:** Ruby\
**Created:** [July 31, 2007, 12:12pm UTC](https://www.ruby-forum.com/t/dash-in-soap-variable-name/110831 "2007-07-31T12:12:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dc4da7/32.png) [@shb](https://www.ruby-forum.com/u/shb)\
**Post date:** [July 31, 2007, 12:12pm UTC](https://www.ruby-forum.com/t/dash-in-soap-variable-name/110831/1 "2007-07-31T12:12:53Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![shb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dc4da7/32.png) [@shb](https://www.ruby-forum.com/u/shb)\
**Post date:** [July 31, 2007, 12:55pm UTC](https://www.ruby-forum.com/t/dash-in-soap-variable-name/110831/2 "2007-07-31T12:55:21Z")

</div>

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](http://johnleach.co.uk)

---

<div class="post-metadata">

**Author:** ![shb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dc4da7/32.png) [@shb](https://www.ruby-forum.com/u/shb)\
**Post date:** [July 31, 2007, 1:09pm UTC](https://www.ruby-forum.com/t/dash-in-soap-variable-name/110831/3 "2007-07-31T13:09:16Z")

</div>

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

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

too bad ☹

lukasz

---

<div class="post-metadata">

**Author:** ![shb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dc4da7/32.png) [@shb](https://www.ruby-forum.com/u/shb)\
**Post date:** [July 31, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/dash-in-soap-variable-name/110831/4 "2007-07-31T15:27:39Z")

</div>

On Jul 31, 1:09 pm, luk asz [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –  
> Posted viahttp://www.ruby-forum.com/.

You should post your question to [http://groups.google.com/group/soap4r](http://groups.google.com/group/soap4r)

---

<div class="post-metadata">

**Author:** ![shb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dc4da7/32.png) [@shb](https://www.ruby-forum.com/u/shb)\
**Post date:** [July 31, 2007, 3:45pm UTC](https://www.ruby-forum.com/t/dash-in-soap-variable-name/110831/5 "2007-07-31T15:45:18Z")

</div>

dima wrote:

> You should post your question to [http://groups.google.com/group/soap4r](http://groups.google.com/group/soap4r)

I’ve done it already.

Greetings,  
Lukasz
