/*
 * Created on 3.10.2006
 *
 */
package fi.seco.courses.sws.example;

import java.rmi.RemoteException;

import javax.xml.rpc.ServiceException;


import fi.seco.courses.sws.example.gen.CurrencyExchangeRateService;
import fi.seco.courses.sws.example.gen.CurrencyExchangeRateServiceServiceLocator;
import fi.seco.courses.sws.example.gen.Request;

/**
 * @author jiemakel
 *
 */
public class TestCurrencyExchangeRateService {

	public static void main(String[] args) throws RemoteException, ServiceException {
		CurrencyExchangeRateServiceServiceLocator locator = new CurrencyExchangeRateServiceServiceLocator();

	    CurrencyExchangeRateService service = locator.getCurrencyExchangeService();
		if (service.getExchangeRate("EUR","EUR")!=1) System.err.println("Something is wrong.");
		System.out.println("Exchange rate between EUR and USD is "+service.getExchangeRate2(new Request("EUR","USD")).getRate());
	}
}
