From 00e8d35c6020d04d0b08af221df1a986f9bb0673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=20Jes=C3=BAs=20Abarca=20Vargas?= Date: Mon, 28 Aug 2017 15:08:41 -0500 Subject: [PATCH 01/12] Bumps up version of rails from 5.0.0 to 5.0.3 to include a bug fix in the minitest plugin. --- Appraisals | 4 ++-- gemfiles/rails_3.2.13.gemfile | 21 ------------------- gemfiles/rails_4.0.0.gemfile | 2 +- gemfiles/rails_4.1.0.gemfile | 2 +- gemfiles/rails_4.2.0.gemfile | 2 +- gemfiles/rails_5.0.0.beta2.gemfile | 19 ----------------- ...ails_5.0.0.gemfile => rails_5.0.3.gemfile} | 4 ++-- 7 files changed, 7 insertions(+), 47 deletions(-) delete mode 100644 gemfiles/rails_3.2.13.gemfile delete mode 100644 gemfiles/rails_5.0.0.beta2.gemfile rename gemfiles/{rails_5.0.0.gemfile => rails_5.0.3.gemfile} (85%) diff --git a/Appraisals b/Appraisals index 3da841e6..e5879b0b 100644 --- a/Appraisals +++ b/Appraisals @@ -14,6 +14,6 @@ appraise "rails-4.2.0" do end -appraise "rails-5.0.0" do - gem "rails", "5.0.0" +appraise "rails-5.0.3" do + gem "rails", "5.0.3" end diff --git a/gemfiles/rails_3.2.13.gemfile b/gemfiles/rails_3.2.13.gemfile deleted file mode 100644 index 30a7d846..00000000 --- a/gemfiles/rails_3.2.13.gemfile +++ /dev/null @@ -1,21 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "wasabi" -gem "savon", ">= 2.0.0" -gem "httpi" -gem "rspec-rails" -gem "guard" -gem "guard-rspec" -gem "rb-fsevent" -gem "appraisal" -gem "tzinfo" -gem "pry" -gem "simplecov" -gem "simplecov-summary" -gem "rails", "3.2.13" -gem "test-unit" -gem "listen", "< 3.1.0" - -gemspec :path => "../" diff --git a/gemfiles/rails_4.0.0.gemfile b/gemfiles/rails_4.0.0.gemfile index b0be367b..6b08fd7e 100644 --- a/gemfiles/rails_4.0.0.gemfile +++ b/gemfiles/rails_4.0.0.gemfile @@ -17,4 +17,4 @@ gem "simplecov-summary" gem "rails", "4.0.0" gem "listen", "< 3.1.0" -gemspec :path => "../" +gemspec path: "../" diff --git a/gemfiles/rails_4.1.0.gemfile b/gemfiles/rails_4.1.0.gemfile index 2ab74511..90819202 100644 --- a/gemfiles/rails_4.1.0.gemfile +++ b/gemfiles/rails_4.1.0.gemfile @@ -17,4 +17,4 @@ gem "simplecov-summary" gem "rails", "4.1.0" gem "listen", "< 3.1.0" -gemspec :path => "../" +gemspec path: "../" diff --git a/gemfiles/rails_4.2.0.gemfile b/gemfiles/rails_4.2.0.gemfile index 4b012b6f..0fb79ec6 100644 --- a/gemfiles/rails_4.2.0.gemfile +++ b/gemfiles/rails_4.2.0.gemfile @@ -17,4 +17,4 @@ gem "simplecov-summary" gem "rails", "4.2.0" gem "listen", "< 3.1.0" -gemspec :path => "../" +gemspec path: "../" diff --git a/gemfiles/rails_5.0.0.beta2.gemfile b/gemfiles/rails_5.0.0.beta2.gemfile deleted file mode 100644 index 11362b1f..00000000 --- a/gemfiles/rails_5.0.0.beta2.gemfile +++ /dev/null @@ -1,19 +0,0 @@ -# This file was generated by Appraisal - -source "http://rubygems.org" - -gem "wasabi" -gem "savon", ">= 2.0.0" -gem "httpi" -gem "rspec-rails" -gem "guard" -gem "guard-rspec" -gem "rb-fsevent" -gem "appraisal" -gem "tzinfo" -gem "pry" -gem "simplecov" -gem "simplecov-summary" -gem "rails", "5.0.0.beta2" - -gemspec :path => "../" diff --git a/gemfiles/rails_5.0.0.gemfile b/gemfiles/rails_5.0.3.gemfile similarity index 85% rename from gemfiles/rails_5.0.0.gemfile rename to gemfiles/rails_5.0.3.gemfile index fa96fd53..69aec8d0 100644 --- a/gemfiles/rails_5.0.0.gemfile +++ b/gemfiles/rails_5.0.3.gemfile @@ -14,6 +14,6 @@ gem "tzinfo" gem "pry" gem "simplecov" gem "simplecov-summary" -gem "rails", "5.0.0" +gem "rails", "5.0.3" -gemspec :path => "../" +gemspec path: "../" From 5ce8f34a67d699057e37090848801cc2a8872c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=20Jes=C3=BAs=20Abarca=20Vargas?= Date: Wed, 30 Aug 2017 11:32:18 -0500 Subject: [PATCH 02/12] Adds option for returning single strings in the response without wrapping them in a tag. --- README.md | 7 +++++++ app/helpers/wash_out_helper.rb | 4 +++- app/views/wash_out/document/response.builder | 2 +- app/views/wash_out/rpc/response.builder | 2 +- lib/wash_out/dispatcher.rb | 5 ++++- spec/lib/wash_out_spec.rb | 12 ++++++++++++ 6 files changed, 28 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index dc6c4bd9..5d236717 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,13 @@ class RumbasController < ApplicationController render :soap => params[:value].to_s end + soap_action 'single_string_response', + args: { a: :string } + return: :string + def single_string_response + render soap: params[:a].to_s, wrap_response: false + end + soap_action "concat", :args => { :a => :string, :b => :string }, :return => :string diff --git a/app/helpers/wash_out_helper.rb b/app/helpers/wash_out_helper.rb index 6171e885..46569d2f 100644 --- a/app/helpers/wash_out_helper.rb +++ b/app/helpers/wash_out_helper.rb @@ -23,10 +23,12 @@ def wsdl_data_attrs(param) end end - def wsdl_data(xml, params) + def wsdl_data(xml, params, wrap_response = true) params.each do |param| next if param.attribute? + return xml.text! param.value.to_s unless wrap_response == true + tag_name = param.name param_options = wsdl_data_options(param) param_options.merge! wsdl_data_attrs(param) diff --git a/app/views/wash_out/document/response.builder b/app/views/wash_out/document/response.builder index 27bde385..b7ab980e 100644 --- a/app/views/wash_out/document/response.builder +++ b/app/views/wash_out/document/response.builder @@ -11,7 +11,7 @@ xml.tag! "soap:Envelope", "xmlns:soap" => 'http://schemas.xmlsoap.org/soap/envel end xml.tag! "soap:Body" do xml.tag! "tns:#{@action_spec[:response_tag]}" do - wsdl_data xml, result + wsdl_data xml, result, wrap_response end end end diff --git a/app/views/wash_out/rpc/response.builder b/app/views/wash_out/rpc/response.builder index 0ccde4e1..34fa7a23 100644 --- a/app/views/wash_out/rpc/response.builder +++ b/app/views/wash_out/rpc/response.builder @@ -12,7 +12,7 @@ xml.tag! "soap:Envelope", "xmlns:soap" => 'http://schemas.xmlsoap.org/soap/envel end xml.tag! "soap:Body" do xml.tag! "tns:#{@action_spec[:response_tag]}" do - wsdl_data xml, result + wsdl_data xml, result, wrap_response end end end diff --git a/lib/wash_out/dispatcher.rb b/lib/wash_out/dispatcher.rb index df5550f8..10cd18f1 100644 --- a/lib/wash_out/dispatcher.rb +++ b/lib/wash_out/dispatcher.rb @@ -137,12 +137,15 @@ def _render_soap(result, options) header = HashWithIndifferentAccess.new(header) end + wrap_response = options.fetch :wrap_response, true + render :template => "wash_out/#{soap_config.wsdl_style}/response", :layout => false, :locals => { :header => header.present? ? inject.call(header, @action_spec[:header_out]) : nil, - :result => inject.call(result, @action_spec[:out]) + :result => inject.call(result, @action_spec[:out]), + :wrap_response => wrap_response }, :content_type => 'text/xml' end diff --git a/spec/lib/wash_out_spec.rb b/spec/lib/wash_out_spec.rb index 6f1714ba..19b0a509 100644 --- a/spec/lib/wash_out_spec.rb +++ b/spec/lib/wash_out_spec.rb @@ -270,6 +270,18 @@ def funky expect(savon(:funky, :a => 42, :b => 'k')[:funky_response][:value]).to eq '420k' end + + it 'responds with single strings without wraping the response' do + mock_controller do + soap_action 'single_string', args: { a: :string }, return: :string + def single_string + render soap: params[:a], wrap_response: false + end + end + + response = savon(:single_string, a: 'single string')[:single_string_response] + expect(response).to match 'single string' + end end context "complex actions" do From 18f70fabc50a9447cd7ae73bfe1b26ea22938fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=20Jes=C3=BAs=20Abarca=20Vargas?= Date: Wed, 30 Aug 2017 17:53:23 -0500 Subject: [PATCH 03/12] Updates the travis config file to use the gemfile for Rails 5.0.3 instead of 5.0.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4c97c19c..f19b93a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ gemfile: - gemfiles/rails_4.0.0.gemfile - gemfiles/rails_4.1.0.gemfile - gemfiles/rails_4.2.0.gemfile - - gemfiles/rails_5.0.0.gemfile + - gemfiles/rails_5.0.3.gemfile rvm: - 2.3.0 before_install: From 81bc6ee1c7b777bef3fae0e8d52c0b7ad0cbb2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=20Jes=C3=BAs=20Abarca=20Vargas?= Date: Tue, 3 Oct 2017 12:31:10 -0500 Subject: [PATCH 04/12] Allow a service_name configuration option with the default as 'service'. --- lib/wash_out/soap_config.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/wash_out/soap_config.rb b/lib/wash_out/soap_config.rb index 438331a3..52a40b6a 100644 --- a/lib/wash_out/soap_config.rb +++ b/lib/wash_out/soap_config.rb @@ -15,6 +15,7 @@ class SoapConfig wsse_password: nil, wsse_auth_callback: nil, soap_action_routing: true, + service_name: 'service' } attr_reader :config From 680cb2b4a27da0b75eddea2e13e76edb8f2f96aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=20Jes=C3=BAs=20Abarca=20Vargas?= Date: Tue, 3 Oct 2017 12:34:41 -0500 Subject: [PATCH 05/12] Renders the service name in the view. --- app/views/wash_out/document/wsdl.builder | 2 +- app/views/wash_out/rpc/wsdl.builder | 2 +- lib/wash_out/dispatcher.rb | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/wash_out/document/wsdl.builder b/app/views/wash_out/document/wsdl.builder index 470d0485..b9e65462 100644 --- a/app/views/wash_out/document/wsdl.builder +++ b/app/views/wash_out/document/wsdl.builder @@ -60,7 +60,7 @@ xml.definitions 'xmlns' => 'http://schemas.xmlsoap.org/wsdl/', end end - xml.service :name => "service" do + xml.service :name => @service_name do xml.port :name => "#{@name}_port", :binding => "tns:#{@name}_binding" do xml.tag! "soap:address", :location => WashOut::Router.url(request, @name) end diff --git a/app/views/wash_out/rpc/wsdl.builder b/app/views/wash_out/rpc/wsdl.builder index 3b9da68f..4ae19306 100644 --- a/app/views/wash_out/rpc/wsdl.builder +++ b/app/views/wash_out/rpc/wsdl.builder @@ -60,7 +60,7 @@ xml.definitions 'xmlns' => 'http://schemas.xmlsoap.org/wsdl/', end end - xml.service :name => "service" do + xml.service :name => @service_name do xml.port :name => "#{@name}_port", :binding => "tns:#{@name}_binding" do xml.tag! "soap:address", :location => WashOut::Router.url(request, @name) end diff --git a/lib/wash_out/dispatcher.rb b/lib/wash_out/dispatcher.rb index 10cd18f1..f00f6a21 100644 --- a/lib/wash_out/dispatcher.rb +++ b/lib/wash_out/dispatcher.rb @@ -72,9 +72,10 @@ def _load_params(spec, xml_data) # This action generates the WSDL for defined SOAP methods. def _generate_wsdl - @map = self.class.soap_actions - @namespace = soap_config.namespace - @name = controller_path + @map = self.class.soap_actions + @namespace = soap_config.namespace + @name = controller_path + @service_name = soap_config.service_name render :template => "wash_out/#{soap_config.wsdl_style}/wsdl", :layout => false, :content_type => 'text/xml' From 9cd0080af52c69391cbf23b716f9b8f3040f81a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=20Jes=C3=BAs=20Abarca=20Vargas?= Date: Tue, 3 Oct 2017 12:35:16 -0500 Subject: [PATCH 06/12] Adds tests for allowing a custom service name. --- spec/lib/wash_out_spec.rb | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/spec/lib/wash_out_spec.rb b/spec/lib/wash_out_spec.rb index 19b0a509..5bc16ce3 100644 --- a/spec/lib/wash_out_spec.rb +++ b/spec/lib/wash_out_spec.rb @@ -119,6 +119,40 @@ def savon!(method, message={}, &block) end end + describe 'WSDL' do + let :wsdl do + mock_controller + + HTTPI.get('http://app/route/api/wsdl').body + end + + let :xml do + nori.parse wsdl + end + + it "defines a default service name as 'service'" do + service_name = xml[:definitions][:service][:@name] + expect(service_name).to match 'service' + end + end + + describe 'WSDL' do + let :wsdl do + mock_controller service_name: 'CustomServiceName' + + HTTPI.get('http://app/route/api/wsdl').body + end + + let :xml do + nori.parse wsdl + end + + it 'allows to define a custom service name' do + service_name = xml[:definitions][:service][:@name] + expect(service_name).to match 'CustomServiceName' + end + end + describe "Dispatcher" do context "simple actions" do From 5d03c47661895a022ae57ad5e1defe272303a9e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=20Jes=C3=BAs=20Abarca=20Vargas?= Date: Tue, 3 Oct 2017 12:39:17 -0500 Subject: [PATCH 07/12] Updates the README file. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5d236717..bea85bfb 100644 --- a/README.md +++ b/README.md @@ -261,6 +261,7 @@ Available properties are: * **namespace**: SOAP namespace to use. Default is `urn:WashOut`. * **snakecase_input**: Determines if WashOut should modify parameters keys to snakecase. Default is `false`. * **camelize_wsdl**: Determines if WashOut should camelize types within WSDL and responses. Supports `true` for CamelCase and `:lower` for camelCase. Default is `false`. +* **service_name**: Allows to define a custom name for the SOAP service. By default, the name is set as `service`. ### Camelization From 4043c3812a22791e55d5c857cab3fcd9280df0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=20Jes=C3=BAs=20Abarca=20Vargas?= Date: Wed, 1 Nov 2017 11:59:00 -0600 Subject: [PATCH 08/12] Fixes crash --- app/helpers/wash_out_helper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/helpers/wash_out_helper.rb b/app/helpers/wash_out_helper.rb index 46569d2f..1275b9c3 100644 --- a/app/helpers/wash_out_helper.rb +++ b/app/helpers/wash_out_helper.rb @@ -10,6 +10,8 @@ def wsdl_data_options(param) end when 'document' { } + else + { } end end From ea094803f9b15200cba7018892796b9368cddde5 Mon Sep 17 00:00:00 2001 From: MtzRojas Date: Thu, 26 Nov 2020 08:37:40 -0600 Subject: [PATCH 09/12] adds custome tags --- app/views/wash_out/document/response.builder | 22 +++++++++++++++----- app/views/wash_out/rpc/response.builder | 22 +++++++++++++++----- lib/wash_out/dispatcher.rb | 18 +++++++++------- lib/wash_out/soap_config.rb | 4 +++- 4 files changed, 48 insertions(+), 18 deletions(-) diff --git a/app/views/wash_out/document/response.builder b/app/views/wash_out/document/response.builder index b7ab980e..b76b3c31 100644 --- a/app/views/wash_out/document/response.builder +++ b/app/views/wash_out/document/response.builder @@ -1,17 +1,29 @@ xml.instruct! xml.tag! "soap:Envelope", "xmlns:soap" => 'http://schemas.xmlsoap.org/soap/envelope/', "xmlns:xsd" => 'http://www.w3.org/2001/XMLSchema', - "xmlns:tns" => @namespace do + "xmlns:#{@response_tag.nil? ? 'tns:' : @response_tag}}" => @namespace do if !header.nil? xml.tag! "soap:Header" do - xml.tag! "tns:#{@action_spec[:response_tag]}" do - wsdl_data xml, header + if @response_attribute_tags.nil? + xml.tag! "#{@response_tag.nil? ? 'tns:' : @response_tag}#{@action_spec[:response_tag]}" do + wsdl_data xml, header + end + else + xml.tag! "#{@response_tag.nil? ? 'tns:' : @response_tag}#{@action_spec[:response_tag]}", @response_attribute_tags do + wsdl_data xml, header + end end end end xml.tag! "soap:Body" do - xml.tag! "tns:#{@action_spec[:response_tag]}" do - wsdl_data xml, result, wrap_response + if @response_attribute_tags.nil? + xml.tag! "#{@response_tag.nil? ? 'tns:' : @response_tag}#{@action_spec[:response_tag]}" do + wsdl_data xml, result + end + else + xml.tag! "#{@response_tag.nil? ? 'tns:' : @response_tag}#{@action_spec[:response_tag]}", @response_attribute_tags do + wsdl_data xml, result + end end end end diff --git a/app/views/wash_out/rpc/response.builder b/app/views/wash_out/rpc/response.builder index 34fa7a23..7763081b 100644 --- a/app/views/wash_out/rpc/response.builder +++ b/app/views/wash_out/rpc/response.builder @@ -2,17 +2,29 @@ xml.instruct! xml.tag! "soap:Envelope", "xmlns:soap" => 'http://schemas.xmlsoap.org/soap/envelope/', "xmlns:xsd" => 'http://www.w3.org/2001/XMLSchema', "xmlns:xsi" => 'http://www.w3.org/2001/XMLSchema-instance', - "xmlns:tns" => @namespace do + "xmlns:#{@response_tag.nil? ? 'tns:' : @response_tag}}" => @namespace do if !header.nil? xml.tag! "soap:Header" do - xml.tag! "tns:#{@action_spec[:response_tag]}" do - wsdl_data xml, header + if @response_attribute_tags.nil? + xml.tag! "#{@response_tag.nil? ? 'tns:' : @response_tag}#{@action_spec[:response_tag]}" do + wsdl_data xml, header + end + else + xml.tag! "#{@response_tag.nil? ? 'tns:' : @response_tag}#{@action_spec[:response_tag]}", @response_attribute_tags do + wsdl_data xml, header + end end end end xml.tag! "soap:Body" do - xml.tag! "tns:#{@action_spec[:response_tag]}" do - wsdl_data xml, result, wrap_response + if @response_attribute_tags.nil? + xml.tag! "#{@response_tag.nil? ? 'tns:' : @response_tag}#{@action_spec[:response_tag]}" do + wsdl_data xml, result + end + else + xml.tag! "#{@response_tag.nil? ? 'tns:' : @response_tag}#{@action_spec[:response_tag]}", @response_attribute_tags do + wsdl_data xml, result + end end end end diff --git a/lib/wash_out/dispatcher.rb b/lib/wash_out/dispatcher.rb index f00f6a21..1ffc68d1 100644 --- a/lib/wash_out/dispatcher.rb +++ b/lib/wash_out/dispatcher.rb @@ -72,10 +72,12 @@ def _load_params(spec, xml_data) # This action generates the WSDL for defined SOAP methods. def _generate_wsdl - @map = self.class.soap_actions - @namespace = soap_config.namespace - @name = controller_path - @service_name = soap_config.service_name + @map = self.class.soap_actions + @namespace = soap_config.namespace + @response_tag = soap_config.response_tag + @response_attribute_tags = soap_config.response_attribute_tags + @name = controller_path + @service_name = soap_config.service_name render :template => "wash_out/#{soap_config.wsdl_style}/wsdl", :layout => false, :content_type => 'text/xml' @@ -83,9 +85,11 @@ def _generate_wsdl # Render a SOAP response. def _render_soap(result, options) - @namespace = soap_config.namespace - @operation = soap_action = request.env['wash_out.soap_action'] - @action_spec = self.class.soap_actions[soap_action] + @namespace = soap_config.namespace + @response_tag = soap_config.response_tag + @response_attribute_tags = soap_config.response_attribute_tags + @operation = soap_action = request.env['wash_out.soap_action'] + @action_spec = self.class.soap_actions[soap_action] result = { 'value' => result } unless result.is_a? Hash result = HashWithIndifferentAccess.new(result) diff --git a/lib/wash_out/soap_config.rb b/lib/wash_out/soap_config.rb index 52a40b6a..1836d2d8 100644 --- a/lib/wash_out/soap_config.rb +++ b/lib/wash_out/soap_config.rb @@ -15,7 +15,9 @@ class SoapConfig wsse_password: nil, wsse_auth_callback: nil, soap_action_routing: true, - service_name: 'service' + service_name: 'service', + response_tag: nil, + response_attribute_tags: nil } attr_reader :config From d3849e29fa7e782eccfdea24c44fc4abeb21cf88 Mon Sep 17 00:00:00 2001 From: MtzRojas Date: Thu, 26 Nov 2020 09:07:46 -0600 Subject: [PATCH 10/12] remove extra symbol in tag --- app/views/wash_out/document/response.builder | 2 +- app/views/wash_out/rpc/response.builder | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/wash_out/document/response.builder b/app/views/wash_out/document/response.builder index b76b3c31..58906e35 100644 --- a/app/views/wash_out/document/response.builder +++ b/app/views/wash_out/document/response.builder @@ -1,7 +1,7 @@ xml.instruct! xml.tag! "soap:Envelope", "xmlns:soap" => 'http://schemas.xmlsoap.org/soap/envelope/', "xmlns:xsd" => 'http://www.w3.org/2001/XMLSchema', - "xmlns:#{@response_tag.nil? ? 'tns:' : @response_tag}}" => @namespace do + "xmlns:#{@response_tag.nil? ? 'tns:' : @response_tag}" => @namespace do if !header.nil? xml.tag! "soap:Header" do if @response_attribute_tags.nil? diff --git a/app/views/wash_out/rpc/response.builder b/app/views/wash_out/rpc/response.builder index 7763081b..fe57b3a9 100644 --- a/app/views/wash_out/rpc/response.builder +++ b/app/views/wash_out/rpc/response.builder @@ -2,7 +2,7 @@ xml.instruct! xml.tag! "soap:Envelope", "xmlns:soap" => 'http://schemas.xmlsoap.org/soap/envelope/', "xmlns:xsd" => 'http://www.w3.org/2001/XMLSchema', "xmlns:xsi" => 'http://www.w3.org/2001/XMLSchema-instance', - "xmlns:#{@response_tag.nil? ? 'tns:' : @response_tag}}" => @namespace do + "xmlns:#{@response_tag.nil? ? 'tns:' : @response_tag}" => @namespace do if !header.nil? xml.tag! "soap:Header" do if @response_attribute_tags.nil? From 449f79713bc6200610baf5e4ec197f6180030bf4 Mon Sep 17 00:00:00 2001 From: MtzRojas Date: Thu, 26 Nov 2020 09:15:39 -0600 Subject: [PATCH 11/12] remove variable tag un envelope --- app/views/wash_out/document/response.builder | 2 +- app/views/wash_out/rpc/response.builder | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/wash_out/document/response.builder b/app/views/wash_out/document/response.builder index 58906e35..8cb14ad6 100644 --- a/app/views/wash_out/document/response.builder +++ b/app/views/wash_out/document/response.builder @@ -1,7 +1,7 @@ xml.instruct! xml.tag! "soap:Envelope", "xmlns:soap" => 'http://schemas.xmlsoap.org/soap/envelope/', "xmlns:xsd" => 'http://www.w3.org/2001/XMLSchema', - "xmlns:#{@response_tag.nil? ? 'tns:' : @response_tag}" => @namespace do + "xmlns:tns" => @namespace do if !header.nil? xml.tag! "soap:Header" do if @response_attribute_tags.nil? diff --git a/app/views/wash_out/rpc/response.builder b/app/views/wash_out/rpc/response.builder index fe57b3a9..25c5c521 100644 --- a/app/views/wash_out/rpc/response.builder +++ b/app/views/wash_out/rpc/response.builder @@ -2,7 +2,7 @@ xml.instruct! xml.tag! "soap:Envelope", "xmlns:soap" => 'http://schemas.xmlsoap.org/soap/envelope/', "xmlns:xsd" => 'http://www.w3.org/2001/XMLSchema', "xmlns:xsi" => 'http://www.w3.org/2001/XMLSchema-instance', - "xmlns:#{@response_tag.nil? ? 'tns:' : @response_tag}" => @namespace do + "xmlns:tns" => @namespace do if !header.nil? xml.tag! "soap:Header" do if @response_attribute_tags.nil? From 473159293aa4c92416d77d8fcf5373ca777ee0a2 Mon Sep 17 00:00:00 2001 From: Gerardo Hernandez Date: Wed, 20 Jan 2021 16:24:44 -0600 Subject: [PATCH 12/12] return default response as Response --- lib/wash_out/soap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wash_out/soap.rb b/lib/wash_out/soap.rb index ec5e25d9..96bf7888 100644 --- a/lib/wash_out/soap.rb +++ b/lib/wash_out/soap.rb @@ -33,7 +33,7 @@ def soap_action(action, options={}) end - default_response_tag = soap_config.camelize_wsdl ? 'Response' : '_response' + default_response_tag = 'Response' default_response_tag = action+default_response_tag