savonrb/savon

bug with 2.15.0 (The first wsdl operation is always used)

jules-w2 opened this issue · 5 comments

Hey

there is a bug with version 2.15.0. The first wsdl operation is always used

I want to call the init_passerelle operation

agency_id     = 352_380
soap_client   = Savon.client(:wsdl => "http://batch.ac3-distribution.com/catalog/admin-v2/webservice_Immo_Square.php?wsdl")
puts soap_client.operations.inspect
soap2 = soap_client.call(:init_passerelle, :message => {
  :idAgence     => agency_id,
  :hash  => "***",
  :idPartenaire => "***"
})

puts(soap2.body)

with the 2.14.0 (I have a return from init_paserelle)

[:info_agence, :init_passerelle, :info_bien, :info_nego]
{:init_passerelle_response=>{:return=>"{\"message\":\"Traitement effectu\\u00e9\"}", :"@xmlns:ns1"=>"urn:ac3wsdl"}}

with the 2.15.0 (I have a return form the first method found in the wsdl (info_agence))

[:info_agence, :init_passerelle, :info_bien, :info_nego]
{:info_agence_response=>{:return=>"{\"352380\":{\"idAgence\":\"352380\",\"company_name\":\"IMMOTIS\"}}", :"@xmlns:ns1"=>"urn:ac3wsdl"}}

Do you know why ?
Can you fix it ?

Bests

pcai commented

Hi - can you provide the versions of wasabi and nori gems as well? There weren't really any changes between 2.15 and 2.14 so it'd be helpful to narrow down which wasabi versions are involved (savon 2.15 allows wasabi 5.x)

Hey @pcai

with the 2.14.0 :

  • wasabi (3.8.0)
  • nori (2.6.0)

with the 2.15.0 :

  • wasabi (4.0.0)
  • nori (2.6.0)

The gem is not compatible with Wasabi 4.x. If i use the 2.15.0 version with the old Wasabi (3.8) version, it's working.

gem "savon", "2.15.0"
gem "wasabi", "< 4.0"
[:info_agence, :init_passerelle, :info_bien, :info_nego]
{:init_passerelle_response=>{:return=>"{\"message\":\"Traitement effectu\\u00e9\"}", :"@xmlns:ns1"=>"urn:ac3wsdl"}}

Do you think you can solve the problem so that it is compatible with wasabi 4.x?

bests

pcai commented

Here is the set of changes between wasabi 3.8 and 4.0: savonrb/wasabi@v3.8.0...v4.0.0
and between 4.0 and 5.0.2: savonrb/wasabi@v4.0.0...v5.0.2

wasabi 4.0 introduced one new feature along with at least one regression that unfortunately wasn't fixed until the 5.x series. Therefore I recommend you report back the results of bumping wasabi to 5.x

Generally our policy is not to backport fixes to prior releases because it makes the test matrix too big.

I'm still on ruby 2.7.x and rails 5.2.x on this project. I can't use wasabi 5.x..

Because wasabi >= 5.0.0 depends on Ruby >= 3.0
  and Gemfile depends on wasabi >= 5.0,
  Ruby >= 3.0 is required.
So, because current Ruby version is = 2.7.6,
  version solving has failed.

shouldn't you update s.required_ruby_version for ruby >=3.x for the 2.15.0 version?

pcai commented

Thanks for the update. Yes, it appears this was an oversight in savon v2.15. The gemspec is updated on main now, but it looks like your ruby version is out of support. I recommend you stick with wasabi 3.8 until you can move to a newer ruby version. Please reopen with additional info if you are able to reproduce on current versions of savon and wasabi.