简体   繁体   中英

Savon ruby gem getting Savon::SOAPFault on request

My code is pretty simple:

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

I get this error:

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:in `call'
        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:in `create_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:in `initialize'
        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]

I have no idea what that means, I have never declared any prefix in my other integrations.

Any help would be appreciated, thanks!

The error seams to be introduced in this commit: https://github.com/savonrb/savon/commit/045082c9d18ed538da072b4a4681e79c16dac17b

Have you tried downgrading Savonrb to a version prior?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM