Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `element_children' for nil:NilClass in parser.rb #54

Open
derekmwright opened this issue Feb 3, 2015 · 2 comments
Open

Comments

@derekmwright
Copy link

It appears that while looping through @messages and setting message to @messages[port_message_type] can break if the port_message_type isn't defined within that message. Being new to SOAP, I'm not sure how "valid" this is but soapui doesnt complain when parsing the WSDL. I added a check before the assignment to see if message is nil and if so just skip over the section. Let me know if you want me to provide the WSDL for validation.

wasabi-3.3.1/lib/wasabi/parser.rb:318:in `output_for': undefined method `element_children' for nil:NilClass (NoMethodError)
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/wasabi-3.3.1/lib/wasabi/parser.rb:149:in `block in parse_operations'
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:187:in `block in each'
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:186:in `upto'
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:186:in `each'
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/wasabi-3.3.1/lib/wasabi/parser.rb:137:in `parse_operations'
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/wasabi-3.3.1/lib/wasabi/parser.rb:60:in `parse'
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/wasabi-3.3.1/lib/wasabi/document.rb:161:in `parse'
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/wasabi-3.3.1/lib/wasabi/document.rb:147:in `parser'
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/wasabi-3.3.1/lib/wasabi/document.rb:64:in `soap_actions'
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/savon-2.8.1/lib/savon/operation.rb:22:in `ensure_exists!'
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/savon-2.8.1/lib/savon/operation.rb:15:in `create'
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/savon-2.8.1/lib/savon/client.rb:32:in `operation'
    from /home/dmwrigh1/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/savon-2.8.1/lib/savon/client.rb:36:in `call'
    from test.rb:12:in `<main>'
tjarratt added a commit that referenced this issue Mar 2, 2015
Fix for issue #54 update to lib/wasabi/parser.rb
@tjarratt
Copy link
Contributor

tjarratt commented Mar 2, 2015

Merged and fixed. I will be trying to release a new version of Wasabi this week.

@mount986
Copy link

I just had to debug through this myself. Turned out the WSDL had an operation but did not include the message. Some better error messaging at least would save a lot of debug time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants