# Wsdl2ruby

**URL:** <https://www.ruby-forum.com/t/wsdl2ruby/113641>\
**Category:** Ruby\
**Created:** [September 3, 2007, 9:47am UTC](https://www.ruby-forum.com/t/wsdl2ruby/113641 "2007-09-03T09:47:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sirtyman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6a8cbe/32.png) [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Post date:** [September 3, 2007, 9:47am UTC](https://www.ruby-forum.com/t/wsdl2ruby/113641/1 "2007-09-03T09:47:53Z")

</div>

Hi,  
How can I create a wsdl class using wsdl2ruby. I run it as follows:

wsdl2ruby.rb --wsdl  
[http://10.10.5.175:8080/wsExtInterface/v2\_1/services/WsGroup?wsdl](http://10.10.5.175:8080/wsExtInterface/v2_1/services/WsGroup?wsdl) --type  
client --force

But nothing happened. So, I have looked into wsdl2ruby.rb located into  
ruby\lib\ruby\1.8\wsdl\soap and realized that the code cannot do  
anything - it has only class definition. Nothing more.

Have anyone a solution for that?  
Thanks in advance for any help or suggestion

MT

---

<div class="post-metadata">

**Author:** ![sirtyman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6a8cbe/32.png) [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Post date:** [September 3, 2007, 12:38pm UTC](https://www.ruby-forum.com/t/wsdl2ruby/113641/2 "2007-09-03T12:38:26Z")

</div>

Marcin T. wrote:

> Hi,  
> How can I create a wsdl class using wsdl2ruby. I run it as follows:
> 
> wsdl2ruby.rb --wsdl  
> [http://10.10.5.175:8080/wsExtInterface/v2\_1/services/WsGroup?wsdl](http://10.10.5.175:8080/wsExtInterface/v2_1/services/WsGroup?wsdl) --type  
> client --force
> 
> But nothing happened. So, I have looked into wsdl2ruby.rb located into  
> ruby\lib\ruby\1.8\wsdl\soap and realized that the code cannot do  
> anything - it has only class definition. Nothing more.
> 
> Have anyone a solution for that?  
> Thanks in advance for any help or suggestion
> 
> MT

It lies not in \lib\ruby\1.8\wsdl\soap but in bin\ subdirectory of  
soap4r package! 🙂

---

<div class="post-metadata">

**Author:** ![sirtyman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6a8cbe/32.png) [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Post date:** [September 4, 2007, 6:45am UTC](https://www.ruby-forum.com/t/wsdl2ruby/113641/3 "2007-09-04T06:45:50Z")

</div>

On Sep 3, 12:38 am, Marcin T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > anything - it has only class definition. Nothing more.
> 
> > Have anyone a solution for that?  
> > Thanks in advance for any help or suggestion
> 
> > MT
> 
> ## It lies not in \lib\ruby\1.8\wsdl\soap but in bin\ subdirectory of soap4r package! 🙂
> 
> Posted viahttp://www.ruby-forum.com/.

Hey, just to let you know… when I was searching around trying to  
find some information on the woefully undocumented Ruby SOAP libraries  
I found several links talking about using this wsdl2ruby script. But  
then I also found someone using a much more straight-forward approach:  
point the WSDLDriverFactory at your wsdl and it just exposes all the  
SOAP calls as methods which take a hash for the parameters.

For example, you can do this:

driver = SOAP::WSDLDriverFactory.new(‘my\_wsdl.xml’).create\_rpc\_driver

and then any calls in my\_wsdl.xml will be available as methods on  
driver, taking a hash of the params. You can just look at the wsdl to  
figure out the names… though the driver factory will tell you if  
you’re missing a required param.

I suppose it’s not that far off from generating, but it’s less code to  
keep around… and I don’t have to re-generate if the wsdl changes  
(though obviously I might need to change the code that uses the wsdl).

Just thought I’d point that out…

Ben
