How to set proxy while using savon?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Magudamudi
    New Member
    • Jun 2011
    • 4

    How to set proxy while using savon?

    Hi,
    While using http we can set the proxy like this
    Code:
    Net::HTTP::Proxy('10.199.99.99',3333,'username','password').start(url.host,url.port)
    When I'm trying to use Savon how to set the proxy?

    My code is
    Code:
     require 'savon'
        client = Savon::Client.new do |wsdl,http|
          wsdl.document = "http://www.webservicex.com/CurrencyConvertor.asmx?wsdl"
        end
        client.wsse.credentials "username", "password"
        response = client.request :conversion_rate do
          soap.body = {
            :from_currency => 'USD',
            :to_currency => 'EUR'
          }
        end
        puts response.to_hash;
        render :text => response.to_hash.to_s
    Please help me to set the proxy while using Savon in Ruby on Rails...

    Thanks in Advance!
Working...