weijenli
weijenli

Reputation: 75

WashOut::Soap parameters missing when upgrading to Rails 6 actionpack 6

I use Washout::SOAP in my Ruby Rails controller which has soap_action like this:

soap_action 'action_name',
              :args   => {:a => :string, :b => :string},
              :return => {'tns:result' => StringArray},
              :response_tag => 'response'

def action_name
  params
  # do somthing
end

In my spec test, I have:

Savon.client( wsdl: wsdl_url ).call(:action_name, message: {a: 'A', b:'B'})

This works when I use Rails 5 and actionpack 5. However, when I switch to Rails 6 and actionpack 6, params[:a] and params[:b] becomes nil .

Does anyone know what is wrong? and how to fix this?

Thanks

Upvotes: 0

Views: 61

Answers (1)

weijenli
weijenli

Reputation: 75

To answer myself: Soven client uses different versions of parser (wasabi) in Rails 5 and 6. And that ends up making different xml messages. The solution is to set no_message_tag to be true in Soven client to use message.to_s instead of parsing it as xml.

Upvotes: 0

Related Questions