# Wsdl2ruby.rb (SOAP4R) generator not working properly

**URL:** <https://rubytalk.org/t/wsdl2ruby-rb-soap4r-generator-not-working-properly/21751>\
**Category:** ruby-talk\
**Created:** [20 October 2005 18:39 UTC](https://rubytalk.org/t/wsdl2ruby-rb-soap4r-generator-not-working-properly/21751 "2005-10-20T18:39:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luke\_Galea](https://avatars.discourse-cdn.com/v4/letter/l/a88e4f/32.png) [@Luke\_Galea](https://rubytalk.org/u/Luke_Galea)\
**Post date:** [20 October 2005 18:39 UTC](https://rubytalk.org/t/wsdl2ruby-rb-soap4r-generator-not-working-properly/21751/1 "2005-10-20T18:39:48Z")

</div>

Hi all,

I'm trying to run wsdl2ruby.rb against an WSDL and I'm getting a funky error msg (part: in0 cannot be resolved).  
The WSDL works perfectly from java (wsdl2java, etc) and is created by apache axis. Throughout the wsdl it refers to input params as in0, in1, etc... so it must be referring to that.. Like this:  
\<wsdl:message name="getPatientsByMrnRequest"\>  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<wsdl:part name="in0" type="soapenc:string"/\>  
\</wsdl:message\>

Does anyone have any idea what is wrong with either the wsdl or wsdl2java? Thanks in advance!!

Exception is:  
F, [2005-10-19T15:43:56.199327 #10244] FATAL -- app: Detected an exception. Stopping ... part: in0 cannot be resolved (RuntimeError)/opt/local/lib/ruby/1.8/wsdl/soap/methodDefCreator.rb:144:in `rpcdefinedtype'/opt/local/lib/ruby/1.8/wsdl/soap/methodDefCreator.rb:49:in `collect\_rpcparameter'/opt/local/lib/ruby/1.8/wsdl/soap/methodDefCreator.rb:47:in `collect'/opt/local/lib/ruby/1.8/wsdl/soap/methodDefCreator.rb:47:in `collect\_rpcparameter'/opt/local/lib/ruby/1.8/wsdl/soap/methodDefCreator.rb:90:in `dump_method'/opt/local/lib/ruby/1.8/wsdl/soap/methodDefCreator.rb:41:in `dump'/opt/local/lib/ruby/1.8/wsdl/soap/methodDefCreator.rb:36:in `each'/opt/local/lib/ruby/1.8/xsd/namedelements.rb:57:in `each'/opt/local/lib/ruby/1.8/xsd/namedelements.rb:57:in `each'/opt/local/lib/ruby/1.8/wsdl/soap/methodDefCreator.rb:36:in `dump'/opt/local/lib/ruby/1.8/wsdl/soap/driverCreator.rb:46:in `dump_porttype'/opt/local/lib/ruby/1.8/wsdl/soap/driverCreator.rb:33:in `dump'/opt/local/lib/ruby/1.8/wsdl/soap/driverCreator.rb:32:in `each'/opt/local/lib/ruby/1.8/xsd/namedelements.rb:57:in `each'/opt/local/lib/ruby/1.8/xsd/namedelements.rb:57:in `each'/opt/local/lib/ruby/1.8/wsdl/soap/driverCreator.rb:32:in `dump'/opt/local/lib/ruby/site\_ruby/1.8/wsdl/soap/wsdl2ruby.rb:125:in `create_driver'/opt/local/lib/ruby/site_ruby/1.8/wsdl/soap/wsdl2ruby.rb:123:in `write\_file'/opt/local/lib/ruby/site\_ruby/1.8/wsdl/soap/wsdl2ruby.rb:134:in `open'/opt/local/lib/ruby/site_ruby/1.8/wsdl/soap/wsdl2ruby.rb:134:in `write\_file'/opt/local/lib/ruby/site\_ruby/1.8/wsdl/soap/wsdl2ruby.rb:123:in `create_driver'/opt/local/lib/ruby/site_ruby/1.8/wsdl/soap/wsdl2ruby.rb:55:in `create\_file'/opt/local/lib/ruby/site\_ruby/1.8/wsdl/soap/wsdl2ruby.rb:36:in `run'/opt/local/bin/wsdl2ruby.rb:42:in `run'/opt/local/lib/ruby/1.8/logger.rb:684:in `start'/opt/local/bin/wsdl2ruby.rb:125

---

<div class="post-metadata">

**Author:** ![SAKURAI\_Masashi](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@SAKURAI\_Masashi](https://rubytalk.org/u/SAKURAI_Masashi)\
**Post date:** [20 October 2005 23:10 UTC](https://rubytalk.org/t/wsdl2ruby-rb-soap4r-generator-not-working-properly/21751/2 "2005-10-20T23:10:57Z")

</div>

Hi,

> **···**
>
> At Fri, 21 Oct 2005 03:39:48 +0900, Luke Galea wrote:
> 
> > Hi all,
> > 
> > I'm trying to run wsdl2ruby.rb against an WSDL and I'm getting a  
> > funky error msg (part: in0 cannot be resolved).  
> > The WSDL works perfectly from java (wsdl2java, etc) and is created by  
> > apache axis. Throughout the wsdl it refers to input params as in0,  
> > in1, etc... so it must be referring to that.. Like this:  
> > \<wsdl:message name="getPatientsByMrnRequest"\>  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<wsdl:part name="in0" type="soapenc:string"/\>  
> > \</wsdl:message\>
> 
> I met the same trouble. Then, replacing "soapenc:string" by  
> "xsd:string", I solved.
> 
> Does wdsl2ruby.rb support subset of soapenc data types?
> 
> --  
> SAKURAI Masashi

---

<div class="post-metadata">

**Author:** ![NAKAMURA\_Hiroshi4](https://avatars.discourse-cdn.com/v4/letter/n/3ab097/32.png) [@NAKAMURA\_Hiroshi4](https://rubytalk.org/u/NAKAMURA_Hiroshi4)\
**Post date:** [22 October 2005 00:48 UTC](https://rubytalk.org/t/wsdl2ruby-rb-soap4r-generator-not-working-properly/21751/3 "2005-10-22T00:48:56Z")

</div>

Hi,

Thanks, Luke and Masashi, for taking the time to file about this problem.

SAKURAI Masashi wrote:

> > I'm trying to run wsdl2ruby.rb against an WSDL and I'm getting a  
> > funky error msg (part: in0 cannot be resolved).  
> > The WSDL works perfectly from java (wsdl2java, etc) and is created by  
> > apache axis. Throughout the wsdl it refers to input params as in0,  
> > in1, etc... so it must be referring to that.. Like this:  
> > \<wsdl:message name="getPatientsByMrnRequest"\>  
> > &nbsp;&nbsp;&nbsp;&nbsp;\<wsdl:part name="in0" type="soapenc:string"/\>  
> > \</wsdl:message\>
> 
> I met the same trouble. Then, replacing "soapenc:string" by  
> "xsd:string", I solved.
> 
> Does wdsl2ruby.rb support subset of soapenc data types?

wsdl2ruby.rb could not handle soapenc types correctly. I fixed and  
posted the latest snapshot tarball at [http://dev.ctor.org/download/](http://dev.ctor.org/download/) .  
Would you please try it?

soap4r does not use soapenc types actively but should accept it  
(wsdl2ruby.rb wrongly ignored it.)

Regards,  
// NaHi

---

<div class="post-metadata">

**Author:** ![SAKURAI\_Masashi](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@SAKURAI\_Masashi](https://rubytalk.org/u/SAKURAI_Masashi)\
**Post date:** [23 October 2005 21:37 UTC](https://rubytalk.org/t/wsdl2ruby-rb-soap4r-generator-not-working-properly/21751/4 "2005-10-23T21:37:34Z")

</div>

Hi,

> \> Does wdsl2ruby.rb support subset of soapenc data types?
> 
> wsdl2ruby.rb could not handle soapenc types correctly. I fixed and  
> posted the latest snapshot tarball at [http://dev.ctor.org/download/](http://dev.ctor.org/download/) .  
> Would you please try it?

I downloaded wsdl2ruby.rb and checked. The latest wsdl2ruby.rb read  
my wdsl file and generated ruby scripts without any troubles.

thanks a lot.

> **···**
>
> --  
> SAKURAI Masashi
