Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/trunk/sample/basic/exchange/exchange.rb

Revision 1843, 431 bytes (checked in by nahi, 2 years ago)
  • reorganize sampless
  • Property svn:eol-style set to native
  • Property svn:keywords set to author date id revision
Line 
1 require 'soap/rpc/driver'
2
3 ExchangeServiceNamespace = 'http://tempuri.org/exchangeService'
4
5 class Exchange
6   ForeignServer = "http://services.xmethods.net/soap"
7   Namespace = "urn:xmethods-CurrencyExchange"
8
9   def initialize
10     @drv = SOAP::RPC::Driver.new(ForeignServer, Namespace)
11     @drv.add_method("getRate", "country1", "country2")
12   end
13
14   def rate(country1, country2)
15     return @drv.getRate(country1, country2)
16   end
17 end
Note: See TracBrowser for help on using the browser.