Skip to content

Commit

Permalink
Fix for issue #54 update to lib/wasabi/parser.rb to ignore message th…
Browse files Browse the repository at this point in the history
…at doesn't have the currently defined port_message_type
  • Loading branch information
Derek Wright committed Feb 3, 2015
1 parent 0e465e9 commit 70dc788
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/wasabi/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,10 @@ def input_for(operation)
end

message = @messages[port_message_type]
port_message_part = message.element_children.find do |node|
soap_body_parts.nil? ? (node.name == 'part') : ( node.name == 'part' && node['name'] == soap_body_parts)
if !message.nil?
port_message_part = message.element_children.find do |node|
soap_body_parts.nil? ? (node.name == 'part') : ( node.name == 'part' && node['name'] == soap_body_parts)
end
end

if port_message_part && port_element = port_message_part.attribute('element')
Expand Down Expand Up @@ -315,8 +317,10 @@ def output_for(operation)
end

message = @messages[port_message_type]
port_message_part = message.element_children.find do |node|
soap_body_parts.nil? ? (node.name == 'part') : ( node.name == 'part' && node['name'] == soap_body_parts)
if !message.nil?
port_message_part = message.element_children.find do |node|
soap_body_parts.nil? ? (node.name == 'part') : ( node.name == 'part' && node['name'] == soap_body_parts)
end
end

if port_message_part && port_element = port_message_part.attribute('element')
Expand Down

0 comments on commit 70dc788

Please sign in to comment.