savonrb / wasabi

A simple WSDL parser
MIT License
90 stars 84 forks source link

NoMethodError: undefined method `element_children' for nil:NilClass at parser.rb:311:in `sections' #61

Open obfuscoder opened 8 years ago

obfuscoder commented 8 years ago
d = Wasabi.document File.read 'service.wsdl'
d.operations

Result:

NoMethodError: undefined method `element_children' for nil:NilClass
    from /home/klehmann/.rvm/gems/jruby-1.7.20@de-mail-ident/gems/wasabi-3.5.0/lib/wasabi/parser.rb:311:in `sections'
    from /home/klehmann/.rvm/gems/jruby-1.7.20@de-mail-ident/gems/wasabi-3.5.0/lib/wasabi/parser.rb:304:in `section'
    from /home/klehmann/.rvm/gems/jruby-1.7.20@de-mail-ident/gems/wasabi-3.5.0/lib/wasabi/parser.rb:294:in `schemas'
    from /home/klehmann/.rvm/gems/jruby-1.7.20@de-mail-ident/gems/wasabi-3.5.0/lib/wasabi/parser.rb:67:in `parse_namespaces'
    from /home/klehmann/.rvm/gems/jruby-1.7.20@de-mail-ident/gems/wasabi-3.5.0/lib/wasabi/parser.rb:54:in `parse'
    from /home/klehmann/.rvm/gems/jruby-1.7.20@de-mail-ident/gems/wasabi-3.5.0/lib/wasabi/document.rb:161:in `parse'
    from /home/klehmann/.rvm/gems/jruby-1.7.20@de-mail-ident/gems/wasabi-3.5.0/lib/wasabi/document.rb:147:in `parser'
    from /home/klehmann/.rvm/gems/jruby-1.7.20@de-mail-ident/gems/wasabi-3.5.0/lib/wasabi/document.rb:64:in `soap_actions'

Apparently, wasabi cannot parse the WSDL correctly. I tried SOAP UI and other implementations. None of which have difficulties with the same WSDL.

The WSDL can be found here:

https://gist.github.com/obfuscoder/f5131a5f801ea995c3ff

huyh commented 8 years ago

Any update on this issue?

mikevoets commented 7 years ago

My solution to this problem is the following:

gem 'savon', '~> 2.0'
gem 'wasabi', '3.1.0' # Unfortunately savon 2 only works properly with wasabi 3.1.0

It seems to not fail as long as wasabi version 3.1.0 is used.