Skip to content

Commit

Permalink
Another small cleanup to the parser
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydurham committed Nov 28, 2010
1 parent e399dd6 commit b94460f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/service_proxy/wsdl/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module ServiceProxy
module WSDL
class Parser < Nokogiri::XML::SAX::Document
attr_accessor :bindings, :services, :namespaces, :operations, :soap_actions

attr_accessor :current_operation

def initialize(*args)
self.operations = []
Expand All @@ -23,12 +25,11 @@ def start_element_namespace(name, attributes, prefix, uri, namespace)
end
when 'operation'
if uri == 'http://schemas.xmlsoap.org/wsdl/soap/'
self.soap_actions[self.operations.last] = attributes.first.value
self.soap_actions[self.current_operation] = attributes.first.value
else
self.operations << attributes.first.value
self.current_operation = attributes.first.value
self.operations << self.current_operation
end
when 'binding'

end
end
end
Expand Down

0 comments on commit b94460f

Please sign in to comment.