Get methods params type soap4r

M

Marco Sangiorgi

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 Sangiorgi



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

Capitan Yesterday

No one could help me? :(

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
 
M

Marco Sangiorgi

Capitan said:
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 Sangiorgi


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

Capitan Yesterday

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::SOAP::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
 
M

Marco Sangiorgi

Capitan said:
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::SOAP::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 Yesterday, and thanks again for your answer :)

dump_method_singature works, but only for simple type. For complex ones,
it only show type's name. :(
 
M

Marco Sangiorgi

Marco said:
Hi Capitan Yesterday, 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 :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top