Skip to content

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

@derekmwright

Description

@derekmwright

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>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions