diff --git a/lib/wasabi/parser.rb b/lib/wasabi/parser.rb index 895e1db..c035dd2 100644 --- a/lib/wasabi/parser.rb +++ b/lib/wasabi/parser.rb @@ -150,7 +150,7 @@ def input_for(operation) binding_type = at_xpath(operation, "../@type").to_s.split(':').last port_type_input = at_xpath(operation, "../../wsdl:portType[@name='#{binding_type}']/wsdl:operation[@name='#{operation_name}']/wsdl:input") - port_message_ns_id, port_message_type = port_type_input.attribute("message").to_s.split(':') + port_message_ns_id, port_message_type = port_type_input.attribute("message").to_s.split(':') if port_type_input message_ns_id, message_type = nil diff --git a/spec/fixtures/no_port_type.wsdl b/spec/fixtures/no_port_type.wsdl new file mode 100644 index 0000000..ce2150a --- /dev/null +++ b/spec/fixtures/no_port_type.wsdl @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spec/wasabi/parser/no_port_type_spec.rb b/spec/wasabi/parser/no_port_type_spec.rb new file mode 100644 index 0000000..08b6bcb --- /dev/null +++ b/spec/wasabi/parser/no_port_type_spec.rb @@ -0,0 +1,11 @@ +require "spec_helper" + +describe Wasabi::Parser do + context "with: no_port_type.wsdl" do + + subject { Wasabi::Document.new fixture(:no_port_type).read } + + its(:operations) { should == { :save => { :action=>"http://example.com/actions.Save", :input => "Save", :namespace_identifier => nil } } } + + end +end \ No newline at end of file