|
Revision 1843, 431 bytes
(checked in by nahi, 2 years ago)
|
|
- 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 |
|---|