`find_value':未定义的方法`每个' for nil:解析响应时的NilClass(NoMethodError)

时间:2017-10-16 12:49:28

标签: ruby soap savon

我使用savon 2.11.2和ruby 2.4.1p111调用SOAP方法

我收到了这个错误:

C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/nori-2.6.0/lib/nori.rb:72:in `find_value': undefined method `each' for nil:NilClass (NoMethodError)
    from C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/nori-2.6.0/lib/nori.rb:38:in `find'
    from C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/savon-2.11.2/lib/savon/soap_fault.rb:36:in `message_by_version'
    from C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/savon-2.11.2/lib/savon/soap_fault.rb:25:in `to_s'
    from C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sensu-plugin-2.3.0/lib/sensu-plugin/cli.rb:65:in `message'
    from C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sensu-plugin-2.3.0/lib/sensu-plugin/cli.rb:65:in `rescue in block in <class:CLI>'
    from C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/sensu-plugin-2.3.0/lib/sensu-plugin/cli.rb:55:in `block in <class:CLI>'

致电时:

client.call(:get_integration_events_request, message: request(system, actual_page))

我不是每次都只是因为特定的响应而得到错误,只有我能看到不同的回复是它有CDATA和其中一个字段内的新行

我使用SOAPUI调用相同的SOAP并使用nori

解析输出
parser = Nori.new
parser.parse(

它解析没有任何问题,但SAVON显然无法在我做任何事情之前解析响应

我尝试将默认解析器从nokogiri更改为rexml,结果相同

0 个答案:

没有答案