4

I am trying to run the wsdl2ruby.rb script that comes with the soap4r gem, and get the following errors:

[ral@lap etc]$ ruby /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/bin/wsdl2ruby.rb
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/charset.rb:13: warning: variable $KCODE is no longer effective
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:68: warning: encoding option is ignored - u
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:69: warning: encoding option is ignored - u
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:70: warning: encoding option is ignored - u
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb:74:in `<top (required)>': XML processor module not found. (RuntimeError)
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/xmlSchema/parser.rb:13:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/xmlSchema/importer.rb:11:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/importer.rb:9:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/soap/wsdl2ruby.rb:11:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:33:in `require'
    from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/bin/wsdl2ruby.rb:5:in `<main>'

I have the following gems installed:

httpclient (2.2.0.1) minitest (1.6.0) rake (0.8.7) rdoc (2.5.8) soap4r (1.5.8)

I have tried to install the xml parser gem which fails with loads of errors: http://pastie.org/1822127

Does anyone know what the problem is? This is my first time touching Ruby.

Is soap4r the best tool for the job for making a SOAP webservice client?

Thanks a lot!

Jason
  • 41
  • 1
  • 2

2 Answers2

9

The answer posted at

http://railsforum.com/viewtopic.php?id=41231

worked for me. That is, I edited the file rubyhome/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb and changed line 66 from:

  c.downcase == name

to

  c.to_s.downcase == name

and the problem appears to be solved.

Larry Talley
  • 311
  • 2
  • 6
3

You might also try the new official repo on Github that has this fix, and others applied to the master branch. You'll need to set your Gemfile to use the git repo as such:

gem 'soap4r', :git => 'git://github.com/felipec/soap4r.git'
wprater
  • 1,022
  • 11
  • 21
  • Could you by change enlighten me, how did you make Gem understand the git:// url prefixes? I'm stuck with "fetch_git" method missing in the current gem – quetzalcoatl Apr 04 '12 at 12:23