From: ghettoiam on 11 May 2010 00:49 I'm trying to use this "Sendfax" method defined here: https://ws.interfax.net/dfs.asmx?WSDL. I can't seem to a set a properly format the request however. Previously I was using SOAP::WSDLDriverFactory and was succesfully using the service, but inside a rails application it could not find the "SOAP" module. A fair bit of time was spent with no resolution. I read good things about SAVON (http://github.com/rubiii/savon) but I can't seem to get it to work in a test or in a project. If anyone is familiar with Savon, I'd -really- appreciate some help as I am stumped as to why this isn't working. I have some straight-forward code: def client @client ||= Savon::Client.new "https://ws.interfax.net/dfs.asmx? WSDL" end def send_fax(username="foo", password="bar", fax_number=nil, data=nil) @response = client.sendfax do |soap| soap.body = {:Username => username, :Password => password, :FaxNumber => fax_number, :FileData => data, :FileType => "HTML"} end end
|
Pages: 1 Prev: Ruby gems in lib - spare tire principle Next: gem install icu4r error |