wasabi icon indicating copy to clipboard operation
wasabi copied to clipboard

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

Open obfuscoder opened this issue 10 years ago • 2 comments

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

obfuscoder avatar Oct 28 '15 08:10 obfuscoder

Any update on this issue?

huyh avatar Aug 30 '16 02:08 huyh

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.

mikevoets avatar Oct 22 '16 00:10 mikevoets

just tried this and it works on main, closing. thx

pcai avatar Oct 01 '24 19:10 pcai