红宝石 soap4r wsdl2ruby.rb 错误[英] Ruby soap4r wsdl2ruby.rb errors

本文是小编为大家收集整理的关于红宝石 soap4r wsdl2ruby.rb 错误的处理方法,想解了红宝石 soap4r wsdl2ruby.rb 错误的问题怎么解决?红宝石 soap4r wsdl2ruby.rb 错误问题的解决办法?那么可以参考本文帮助大家快速定位并解决问题。

问题描述

我正在尝试运行 soap4r gem 附带的 wsdl2ruby.rb 脚本,并得到以下错误:

[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>'

我安装了以下 gem:

<块引用>

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

我尝试安装 xml 解析器 gem,但由于大量错误而失败:http://pastie.org/1822127

有谁知道问题出在哪里?这是我第一次接触 Ruby.

soap4r 是制作 SOAP Web 服务客户端的最佳工具吗?

非常感谢!

推荐答案

答案贴在

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

为我工作.也就是说,我编辑了文件 rubyhome/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb 并将第 66 行更改为:

  c.downcase == name

  c.to_s.downcase == name

问题似乎已经解决了.

本文地址:https://www.itbaoku.cn/post/786332.html