# Get methods params type soap4r

**URL:** <https://www.ruby-forum.com/t/get-methods-params-type-soap4r/189147>\
**Category:** Ruby\
**Created:** [May 25, 2010, 2:50pm UTC](https://www.ruby-forum.com/t/get-methods-params-type-soap4r/189147 "2010-05-25T14:50:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9de0a6/32.png) [@marcos](https://www.ruby-forum.com/u/marcos)\
**Post date:** [May 25, 2010, 2:50pm UTC](https://www.ruby-forum.com/t/get-methods-params-type-soap4r/189147/1 "2010-05-25T14:50:56Z")

</div>

Hello everybody, I’m using the following to get a driver to call to some  
functions on a remote soap described by wsdl:

require ‘soap/wsdlDriver’  
wsdl = “mywsdluri”  
client = SOAP::WSDLDriverFactory.new(wsdl).create\_rpc\_driver

Then I can easy call soap methods with client.method\_name, but I’m not  
able to figure out if I could get a simple list of paramaters those  
methods requires.

I’ve found this ticket [1], with dump\_method\_signature that seems to be  
something like what I’m searching for, but I could’t understand how to  
use it.

Some ideas?

Thanks in advance  
Marco S.

[1] [http://dev.ctor.org/soap4r/changeset/1922](http://dev.ctor.org/soap4r/changeset/1922)

---

<div class="post-metadata">

**Author:** ![marcos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9de0a6/32.png) [@marcos](https://www.ruby-forum.com/u/marcos)\
**Post date:** [May 27, 2010, 2:09pm UTC](https://www.ruby-forum.com/t/get-methods-params-type-soap4r/189147/2 "2010-05-27T14:09:15Z")

</div>

No one could help me? ☹

---

<div class="post-metadata">

**Author:** ![marcos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9de0a6/32.png) [@marcos](https://www.ruby-forum.com/u/marcos)\
**Post date:** [May 27, 2010, 6:10pm UTC](https://www.ruby-forum.com/t/get-methods-params-type-soap4r/189147/3 "2010-05-27T18:10:48Z")

</div>

On 27 Mag, 14:09, Marco S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## No one could help me? ☹
> 
> Posted viahttp://www.ruby-forum.com/.

Can’t you just look in the wsdl?  
When I used soap4r I did something like:

params = {:param1 =\> ‘some\_value’, :param2 =\> 42};  
response = driver.my\_method params

I took :param1 and :param2 names directly from the wsdl method  
definition.  
Otherwise, you can use wsdl2ruby…  
Hope it helps

---

<div class="post-metadata">

**Author:** ![marcos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9de0a6/32.png) [@marcos](https://www.ruby-forum.com/u/marcos)\
**Post date:** [May 27, 2010, 6:24pm UTC](https://www.ruby-forum.com/t/get-methods-params-type-soap4r/189147/4 "2010-05-27T18:24:53Z")

</div>

Capitan Y. wrote:

> On 27 Mag, 14:09, Marco S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > ## No one could help me? ☹
> > 
> > Posted viahttp://www.ruby-forum.com/.
> 
> Can’t you just look in the wsdl?  
> When I used soap4r I did something like:
> 
> params = {:param1 =\> ‘some\_value’, :param2 =\> 42};  
> response = driver.my\_method params
> 
> I took :param1 and :param2 names directly from the wsdl method  
> definition.  
> Otherwise, you can use wsdl2ruby…  
> Hope it helps

First of all, thanks for your answer 🙂

The problem is that I have to automatically build html form from each  
soap method, so I have to know how and how many params each method takes  
without look in the wsdl…

Something like this! [1]

Some ideas? Thanks a lot again,  
Marco S.

[1] [http://www.service-repository.com/client/start](http://www.service-repository.com/client/start)

---

<div class="post-metadata">

**Author:** ![marcos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9de0a6/32.png) [@marcos](https://www.ruby-forum.com/u/marcos)\
**Post date:** [May 28, 2010, 2:25pm UTC](https://www.ruby-forum.com/t/get-methods-params-type-soap4r/189147/5 "2010-05-28T14:25:29Z")

</div>

Have you tried sending dump\_method\_signatures to a WSDLDriverFactory  
object?  
Right now I’m on a windows machine (with ruby 1.8.6) and  
WSDLDriverFactory doesn’t have that method, so I can’t try. It should  
include WSDL:🧼:ClassDefCreatorSupport and so you should be able  
to call dump\_method\_signatures.  
Otherwise, you could try to iterate on the services/ports of the wsdl  
attribute of a factory object, just like dump\_method\_signature does. I  
am no expert, so don’t take my suggestions too seriously 🙂

Bye

---

<div class="post-metadata">

**Author:** ![marcos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9de0a6/32.png) [@marcos](https://www.ruby-forum.com/u/marcos)\
**Post date:** [June 1, 2010, 9:47am UTC](https://www.ruby-forum.com/t/get-methods-params-type-soap4r/189147/6 "2010-06-01T09:47:26Z")

</div>

Capitan Y. wrote:

> Have you tried sending dump\_method\_signatures to a WSDLDriverFactory  
> object?  
> Right now I’m on a windows machine (with ruby 1.8.6) and  
> WSDLDriverFactory doesn’t have that method, so I can’t try. It should  
> include WSDL:🧼:ClassDefCreatorSupport and so you should be able  
> to call dump\_method\_signatures.  
> Otherwise, you could try to iterate on the services/ports of the wsdl  
> attribute of a factory object, just like dump\_method\_signature does. I  
> am no expert, so don’t take my suggestions too seriously 🙂
> 
> Bye

Hi Capitan Y., and thanks again for your answer 🙂

dump\_method\_singature works, but only for simple type. For complex ones,  
it only show type’s name. ☹

---

<div class="post-metadata">

**Author:** ![marcos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9de0a6/32.png) [@marcos](https://www.ruby-forum.com/u/marcos)\
**Post date:** [June 23, 2010, 10:30am UTC](https://www.ruby-forum.com/t/get-methods-params-type-soap4r/189147/7 "2010-06-23T10:30:00Z")

</div>

Marco S. wrote:

> Capitan Y. wrote:
> 
> > Have you tried sending dump\_method\_signatures to a WSDLDriverFactory  
> > object?  
> > Right now I’m on a windows machine (with ruby 1.8.6) and  
> > WSDLDriverFactory doesn’t have that method, so I can’t try. It should  
> > include WSDL:🧼:ClassDefCreatorSupport and so you should be able  
> > to call dump\_method\_signatures.  
> > Otherwise, you could try to iterate on the services/ports of the wsdl  
> > attribute of a factory object, just like dump\_method\_signature does. I  
> > am no expert, so don’t take my suggestions too seriously 🙂
> > 
> > Bye
> 
> Hi Capitan Y., and thanks again for your answer 🙂
> 
> dump\_method\_singature works, but only for simple type. For complex ones,  
> it only show type’s name. ☹

I’ve tried for several days to resolve my problem, I think I’ll give it  
up ☹
