savonrb / savon

Heavy metal SOAP client
https://www.savonrb.com
MIT License
2.07k stars 616 forks source link

Savon::SOAPFault - Trying to declare prefix 'xmlns' after upgrading to 2.13.0 #976

Closed OlivierGrimard closed 2 years ago

OlivierGrimard commented 2 years ago

client = Savon.client(wsdl: wsdl_url, follow_redirects: true) response = client.call(:obtener_cotizacion, message: { fecha: '2022-08-02' })

Traceback (most recent call last): 8: from bin/console:8:in <main>' 7: from (irb):82 6: from /app/vendor/bundle/ruby/2.7.0/gems/savon-2.13.0/lib/savon/client.rb:37:incall' 5: from /app/vendor/bundle/ruby/2.7.0/gems/savon-2.13.0/lib/savon/operation.rb:65:in call' 4: from /app/vendor/bundle/ruby/2.7.0/gems/savon-2.13.0/lib/savon/operation.rb:76:increate_response' 3: from /app/vendor/bundle/ruby/2.7.0/gems/savon-2.13.0/lib/savon/operation.rb:76:in new' 2: from /app/vendor/bundle/ruby/2.7.0/gems/savon-2.13.0/lib/savon/response.rb:20:ininitialize' 1: from /app/vendor/bundle/ruby/2.7.0/gems/savon-2.13.0/lib/savon/response.rb:132:in `raise_soap_and_http_errors!' Savon::SOAPFault ((S:Client) Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxParsingException: Trying to declare prefix 'xmlns' (illegal as per NS 1.1 #4)) at [row,col {unknown-source}]: [1,585]

See the error here: https://stackoverflow.com/questions/73324877/savon-ruby-gem-getting-savonsoapfault-on-request/73442187#73442187

The WA is to use 2.12.1 for now.

mpalenciano commented 2 years ago

Same problem here with 2.13.0. Downgraded to 2.12.1.

yyamano commented 2 years ago

The problem was analyzed by @cgunther. See https://github.com/savonrb/savon/pull/943#issuecomment-1213163418

olleolleolle commented 2 years ago

977 is now merged, please do try that change.

mpalenciano commented 2 years ago

Looking good for me. Thank you.

olleolleolle commented 2 years ago

Very good, then this Issue is thereby closed.