Problems with soap4r's wsdl2ruby.rb

I decided to try some things with soap4r's wsdl2ruby.rb script, and unfortunately the first wsdl definition I tried to parse generated an error, trying to call '.name' on a nil object.

I'm not sure what's going on, and wasn't able to find a way to turn on debugging in the app to see where it is in the parse tree when things blow up. I'm not sure where to go from here. I can't guarantee that the wsdl file is valid either, so maybe that's where the problem is?

Anyhow, here's what I got when parsing the wsdl file here:

http://www.adessosystems.net/adessosql/adessosql.asmx?WSDL

Any suggestions would be greatly appreciated.

Ben

F, [2004-07-14T15:07:25.161225 #836] FATAL -- app: Detected an exception. Stopping ... undefined method `name' for nil:NilClass (NoMethodError)
/usr/lib/ruby/site_ruby/1.8/wsdl/soap/methodDefCreatorSupport.rb:28:in `create_class_name'
/usr/lib/ruby/site_ruby/1.8/wsdl/soap/methodDefCreatorSupport.rb:72:in `dump_inout_type'
/usr/lib/ruby/site_ruby/1.8/wsdl/soap/methodDefCreatorSupport.rb:71:in `each'
/usr/lib/ruby/site_ruby/1.8/wsdl/soap/methodDefCreatorSupport.rb:71:in `dump_inout_type'
/usr/lib/ruby/site_ruby/1.8/wsdl/soap/methodDefCreatorSupport.rb:55:in `dump_signature'
/usr/lib/ruby/site_ruby/1.8/wsdl/soap/clientSkeltonCreator.rb:50:in `dump_porttype'
/usr/lib/ruby/site_ruby/1.8/wsdl/soap/clientSkeltonCreator.rb:49:in `each'
/usr/lib/ruby/1.8/xsd/namedelements.rb:43:in `each'
/usr/lib/ruby/site_ruby/1.8/wsdl/soap/clientSkeltonCreator.rb:49:in `dump_porttype'
/usr/lib/ruby/site_ruby/1.8/wsdl/soap/clientSkeltonCreator.rb:29:in `dump'
/usr/lib/ruby/site_ruby/1.8/wsdl/soap/clientSkeltonCreator.rb:28:in `each'
/usr/lib/ruby/1.8/xsd/namedelements.rb:43:in `each'
/usr/lib/ruby/site_ruby/1.8/wsdl/soap/clientSkeltonCreator.rb:28:in `dump'
./wsdl2ruby.rb:150:in `create_client_skelton'
./wsdl2ruby.rb:147:in `open'
./wsdl2ruby.rb:147:in `create_client_skelton'
./wsdl2ruby.rb:55:in `create_file'
./wsdl2ruby.rb:45:in `run'
/usr/lib/ruby/1.8/logger.rb:683:in `start'
./wsdl2ruby.rb:236
I, [2004-07-14T15:07:25.161292 #836] INFO -- app: End of app. (status: -1)

Hi,

Thank you for your interest.

Ben Giddings wrote:

I decided to try some things with soap4r's wsdl2ruby.rb script, and unfortunately the first wsdl definition I tried to parse generated an error, trying to call '.name' on a nil object.

Wsdl2ruby.rb should dump more friendly error message. Sorry for the inconvenience.

I'm not sure what's going on, and wasn't able to find a way to turn on debugging in the app to see where it is in the parse tree when things blow up. I'm not sure where to go from here. I can't guarantee that the wsdl file is valid either, so maybe that's where the problem is?

Anyhow, here's what I got when parsing the wsdl file here:

http://www.adessosystems.net/adessosql/adessosql.asmx?WSDL

I found the WSDL only defines 'style="document"' services. It is called "document oriented service" in SOAP. For now, soap4r supports only rpc oriented service but I'm working on partial document oriented service support now. Please wait for a while.

Regards,
// NaHi

NAKAMURA, Hiroshi wrote:

Ben Giddings wrote:

I decided to try some things with soap4r's wsdl2ruby.rb script, and unfortunately the first wsdl definition I tried to parse generated an error, trying to call '.name' on a nil object.

Wsdl2ruby.rb should dump more friendly error message. Sorry for the inconvenience.

No problem. You warned it was 'alpha' quality stuff, so I wasn't surprised to have problems with it.

I found the WSDL only defines 'style="document"' services. It is called "document oriented service" in SOAP. For now, soap4r supports only rpc oriented service but I'm working on partial document oriented service support now. Please wait for a while.

Ok, thanks. It's no rush, this is just a fun side project I'm doing. Thanks for your efforts.

Ben

NAKAMURA, Hiroshi wrote:

I found the WSDL only defines 'style="document"' services. It is called
"document oriented service" in SOAP. For now, soap4r supports only rpc
oriented service but I'm working on partial document oriented service
support now. Please wait for a while.

I have a WSDL file that contains an RPC style, and it works find with standard
Web service software. Am I misunderstanding your statement?

Here's the binding:

  <binding name="SOAPBinding" type="tns:loanApprovalPT">
    <soap:binding style="rpc"
                  transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="approve">
      <soap:operation soapAction="" style="rpc"/>
      <input>
         <soap:body use="encoded" namespace="urn:loanapprover"
               encodingStyle="http://schemas.xmlsoap.org/soap/encoding/“/>
       </input>
       <output>
         <soap:body use="encoded" namespace="urn:loanapprover"
                 encodingStyle="http://schemas.xmlsoap.org/soap/encoding/”/>
       </output>
      </operation>
   </binding>

Jim

···

--
Jim Menard, jimm@io.com, http://www.io.com/~jimm/
"The theory of computation states that all automatons can be emulated by a
Turing machine. I have a less abstract but more practical motto: If you can
do it on Intel, you can do it damn near anywhere!" -- Eugene O'Neil

Hi,

Jim Menard wrote:

I found the WSDL only defines 'style="document"' services. It is called "document oriented service" in SOAP. For now, soap4r supports only rpc oriented service but I'm working on partial document oriented service support now. Please wait for a while.

I have a WSDL file that contains an RPC style, and it works find with standard
Web service software. Am I misunderstanding your statement?

I think I didn't write explicitly.

RPC style (style="rpc") is fully (I hope) supported (even if it isn't documented). But document style is not supported for now. And I want to add partial document style support in the next release of soap4r.

Or, am I misunderstand you? Is there any problem with style="rpc" WSDL?

# I should take a time to learn English before spending time for soap4r and Ruby. :slight_smile:

Regards,
// NaHi

NAKAMURA, Hiroshi writes:

Hi,

Jim Menard wrote:
>>I found the WSDL only defines 'style="document"' services. It is called
>>"document oriented service" in SOAP. For now, soap4r supports only rpc
>>oriented service but I'm working on partial document oriented service
>>support now. Please wait for a while.

> I have a WSDL file that contains an RPC style, and it works find with standard
> Web service software. Am I misunderstanding your statement?

I think I didn't write explicitly.

RPC style (style="rpc") is fully (I hope) supported (even if it isn't
documented). But document style is not supported for now. And I want
to add partial document style support in the next release of soap4r.

Thank you. I understand now.

Or, am I misunderstand you? Is there any problem with style="rpc" WSDL?

No, I misunderstood you (and I should have looked at the source).

# I should take a time to learn English before spending time for soap4r
and Ruby. :slight_smile:

Your English is infinitely better than my Japanese. Please don't take any time
away from soap4r to improve what is already excellent English :slight_smile:

Jim

···

--
Jim Menard, jimm@io.com, http://www.io.com/~jimm/
"Indeed, an upsettingly large part of academia right now seems to be
working on bringing Java into the 1980s... sigh." -- Avi Bryant

Hi,

It's good to hear soap4r/wsdl4r is working for you.

Jim Menard wrote:

Your English is infinitely better than my Japanese. Please don't take any time
away from soap4r to improve what is already excellent English :slight_smile:

Thanks to your kind word. Domo Arigato.

Regards,
// NaHi