2

I try to connect soap via savon, I get an error:

(a:InternalServiceFault) Object reference not set to an instance of an object.

Extracted source (around line #85):
    def raise_soap_and_http_errors!
      raise soap_fault if soap_fault?
      raise http_error if http_error?
    end

here is my code:

client = Savon.client(wsdl: 'http://moghim24.ir:8080/Moghim24Scripts/Moghim24Services.svc?wsdl')
response = client.call(:open_tempfllist) do
   message fd: '96/01/01'.to_s, ld:  '97/01/01'.to_s, cust:  '1005'.to_s, pass:  '233344'.to_s
end
render :json => response.body

the error happens at this raise soap_fault if soap_fault?

  • 1
    which line is throwing that error ?. Have you tried receiving the object in the block like: `response = client.call(:open_tempfllist) do |locals|` and then `locals.message fd: '96/01/01'.to_s, ld: '97/01/01'.to_s, cust: '1005'.to_s, pass: '233344'.to_s` ? – fanta May 21 '17 at 12:18
  • message do not send parameters correctly @fanta – Monsieur Alireza May 21 '17 at 12:21
  • 1
    On what line does that error occur? Please post the full error message including the stacktrace. Btw. you can remove the `to_s` calls because the things are already strings. – spickermann May 21 '17 at 12:21
  • @spickermann the question is updated now – Monsieur Alireza May 21 '17 at 12:27

0 Answers0