# Wsdl2ruby

**URL:** <https://rubytalk.org/t/wsdl2ruby/40347>\
**Category:** ruby-talk\
**Created:** [3 September 2007 07:47 UTC](https://rubytalk.org/t/wsdl2ruby/40347 "2007-09-03T07:47:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcin\_Tyman](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Marcin\_Tyman](https://rubytalk.org/u/Marcin_Tyman)\
**Post date:** [3 September 2007 07:47 UTC](https://rubytalk.org/t/wsdl2ruby/40347/1 "2007-09-03T07:47:59Z")

</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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Marcin\_Tyman](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@Marcin\_Tyman](https://rubytalk.org/u/Marcin_Tyman)\
**Post date:** [3 September 2007 10:38 UTC](https://rubytalk.org/t/wsdl2ruby/40347/2 "2007-09-03T10:38:42Z")

</div>

Marcin Tyman 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! 🙂

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![bmunat](https://avatars.discourse-cdn.com/v4/letter/b/f0a364/32.png) [@bmunat](https://rubytalk.org/u/bmunat)\
**Post date:** [4 September 2007 04:45 UTC](https://rubytalk.org/t/wsdl2ruby/40347/3 "2007-09-04T04:45:10Z")

</div>

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

> **···**
>
> On Sep 3, 12:38 am, Marcin Tyman \<m.ty...@interia.pl\> wrote:
> 
> > Marcin Tyman 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--type](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! 🙂  
> > --  
> > Posted viahttp://www.ruby-forum.com/.
