Ruby soap4r wsdl2ruby.rb错误 [英] Ruby soap4r wsdl2ruby.rb errors

查看:130
本文介绍了Ruby 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:警告:变量$ KCODE不再有效
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5 .8 / lib / soap / property.rb:68:警告:编码选项被忽略 - u
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/ property.rb:69:警告:编码选项被忽略 - u
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:70:警告:编码选项被忽略 - u
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb:74:in`< top(required) >':未找到XML处理器模块。 (RuntimeError)从< internal:lib / ruby​​gems / custom_require>中获得
:29:在'require'
从< internal:lib / ruby​​gems / custom_require>:29:在'require'
from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/xmlSchema/parser.rb:13:in`< top(required)>'
从< internal:lib / ruby​​gems / custom_require>:29:在'require'
from< internal:lib / ruby​​gems / custom_require>:29:'require'
from / usr / lib / ruby / gems / 1.9.1 / gems / soap4r-1.5.8 / lib / wsdl / xmlSchema / importer.rb:11:在< internal:lib中用< top(required)>'
rubygems / custom_require> 29:在'require'
from< internal:lib / ruby​​gems / custom_require>:29:'require'
from /usr/lib/ruby/gems/1.9.1 /gems/soap4r-1.5.8/lib/wsdl/importer.rb:9:in从< internal:lib / ruby​​gems / custom_require>'< top(required)>'
:29:从< internal:lib / ruby​​gems / custom_require>中请求'
:29:在'require'
从/ usr / lib / ruby​​ / gems / 1.9.1 / gems / soap4r-1.5.8 / lib / wsdl / soap / wsdl2ruby.rb:11:在<< top(required)>'
from< internal: lib / ruby​​gems / custom_require>:33:在'require'
from< internal:lib / ruby​​gems / custom_require>:33:在'rescue in require'
from< internal:lib / ruby​​gems / custom_require>:29:在'require'中
来自/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/bin/wsdl2ruby.rb:5:in`< main>'

我安装了以下宝石:


httpclient(2.2.0.1)minitest(1.6.0)
rake(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



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

  c.downcase == name 

  c.to_s.downcase == name 

并且问题似乎已解决。


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!

解决方案

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.

这篇关于Ruby soap4r wsdl2ruby.rb错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆