FATAL -- app: Detected an exception. Stopping ... undefined method `collect' for "require 'soap/mapping'":String (NoMethodError)
I have soap4r installed from git and I am trying to generate client stubs to web-service:
c:\Tmp\web_servoices>ruby c:\Ruby192\bin\wsdl2ruby.rb --wsdl http://...?wsdl --type client
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/charset.rb:13: warning: variable $KCODE is no longer effective
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:68: warning: encoding option is ignored - u
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:69: warning: encoding option is ignored - u
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:70: warning: encoding option is i开发者_StackOverflowgnored - u
I, [2011-10-07T17:18:25.641447 #5588] INFO -- app: Creating class definition.
W, [2011-10-07T17:18:25.641447 #5588] WARN -- app: File 'DiscountsManagerService.rb' exists. c:/Ruby192/bin/wsdl2ruby.rb did not override it.
I, [2011-10-07T17:18:25.642447 #5588] INFO -- app: Creating mapping registry definition.
I, [2011-10-07T17:18:25.642447 #5588] INFO -- app: Creates file 'DiscountsManagerServiceMappingRegistry.rb'.
F, [2011-10-07T17:18:25.695447 #5588] FATAL -- app: Detected an exception. Stopping ... undefined method `collect' for "require 'soap/mapping'":String (NoMethodError)
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/codegen/gensupport.rb:239:in `trim_eol'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/codegen/gensupport.rb:227:in `format'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/codegen/moduledef.rb:110:in `dump_requirepath'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/codegen/moduledef.rb:71:in `dump'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/soap/mappingRegistryCreator.rb:52:in `dump'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/soap/wsdl2ruby.rb:87:in `block in create_mapping_registry'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/soap/wsdl2ruby.rb:171:in `block in write_file'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/soap/wsdl2ruby.rb:170:in `open'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/soap/wsdl2ruby.rb:170:in `write_file'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/soap/wsdl2ruby.rb:85:in `create_mapping_registry'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/soap/wsdl2ruby.rb:63:in `create_file'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/soap/wsdl2ruby.rb:42:in `run'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/bin/wsdl2ruby.rb:46:in `run'
c:/Ruby192/lib/ruby/1.9.1/logger.rb:691:in `start'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/bin/wsdl2ruby.rb:137:in `<top (required)>'
c:/Ruby192/bin/wsdl2ruby.rb:19:in `load'
c:/Ruby192/bin/wsdl2ruby.rb:19:in `<main>'
I, [2011-10-07T17:18:25.695447 #5588] INFO -- app: End of app. (status: -1)
How can I fix the error?
try to install this fork https://rubygems.org/gems/mumboe-soap4r .
my code work with gem install 'mumboe-soap4r'
精彩评论