Skip to content

Commit

Permalink
Force Nori to strip namespaces to reach request body properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Staal committed Dec 28, 2011
1 parent c6f8cb6 commit 7c854b9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/wash_with_soap/wsdl.builder
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ xml.definitions 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',
xml.tag! "soap:address", :location => url_for(:action => '_action', :only_path => false)
end
end
end
end
4 changes: 2 additions & 2 deletions gemfiles/rails-3.0.11.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: /home/whitequark/wash_out
remote: /Users/lovchy/Sites/wash_out
specs:
wash_out (0.2.1)
wash_out (0.2.3)
nori

GEM
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails-3.1.3.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: /home/whitequark/wash_out
remote: /Users/lovchy/Sites/wash_out
specs:
wash_out (0.2.1)
wash_out (0.2.3)
nori

GEM
Expand Down
4 changes: 4 additions & 0 deletions lib/wash_out/dispatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ def _parse_soap_parameters
soap_action = request.env['wash_out.soap_action']
action_spec = self.class.soap_actions[soap_action]

strip = Nori.strip_namespaces?

Nori.strip_namespaces = true
params = Nori.parse(request.body)
xml_data = params[:envelope][:body][soap_action.underscore.to_sym]
Nori.strip_namespaces = strip

@_params = HashWithIndifferentAccess.new
(xml_data || {}).map do |opt, value|
Expand Down

0 comments on commit 7c854b9

Please sign in to comment.