Consuming webservice using savon gem


#1

Hello folks,

I’m trying to consume a webservice using the savon gem as follow, but I get as response: “Savon::SOAPFault Exception: (soapenv:Server.userException) org.xml.sax.SAXException: Found character data inside an array element while deserializing”

If you type ‘client.operations’ in the byebug, you can get the operations. Parameters look fine, but I don’t know what is going on…

require 'savon'
require 'byebug'

def scraper
	client = Savon.client(wsdl: 'https://www3.bcb.gov.br/sgspub/JSP/sgsgeral/FachadaWSSGS.wsdl')
	#ruby response =  client.call(:get_valor, message: {codigoSerie: 10813, data: '07/02/2018'})
        client.call(:get_valores_series_vo, message: {codigoSerie: 1, dataInicio: '01/01/2018'})

	byebug
end	

scraper

#2

def testing
puts ‘aa’
end