我正在使用 Ruby 和 Savon 编写一个小客户端。界面从 0.7 版本显着更改为 0.8.x。我所有的调用都不再起作用了:-(。我怎样才能传递一个本地成员变量。请看这个例子,@userName 和@userPassword 没有在块中定义。
begin
@response = @authentication_svc.request :wsdl, "AuthenticateUser" do
http.headers["SOAPAction"] = "AuthenticateUser"
soap.body = "#{@userName}#{@passwd}"
end
rescue Savon::SOAP::Fault => e
@last_soap_error = e.message
end