diff options
Diffstat (limited to 'sample/soap/exchange/exchange.rb')
-rw-r--r-- | sample/soap/exchange/exchange.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sample/soap/exchange/exchange.rb b/sample/soap/exchange/exchange.rb new file mode 100644 index 0000000000..00f930deb8 --- /dev/null +++ b/sample/soap/exchange/exchange.rb @@ -0,0 +1,17 @@ +require 'soap/rpc/driver' + +ExchangeServiceNamespace = 'http://tempuri.org/exchangeService' + +class Exchange + ForeignServer = "http://services.xmethods.net/soap" + Namespace = "urn:xmethods-CurrencyExchange" + + def initialize + @drv = SOAP::RPC::Driver.new(ForeignServer, Namespace) + @drv.add_method("getRate", "country1", "country2") + end + + def rate(country1, country2) + return @drv.getRate(country1, country2) + end +end |