cannot set SOAP header parameters on savon call

吃可爱长大的小学妹 提交于 2019-12-04 08:32:49

You're on Savon 2.2.0. You should use

response = client.call(:get_user_info, :soap_header => { :session_id => sid })

'request' is a method from version 1.x and not supported anymore.

What if you create a new Savon client with the session id?

client = Savon.client(
  wsdl: SOAP_WSDL,
  endpoint: SOAP_URL,
  soap_header: {
    "Header" => { "session_id" => sid }
  }
)

client.call(:get_user_info, message: data)

Or like this, for both a header and body:

@response = @client.call(operation, { :message => message, :soap_header => header })
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!