KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openedit > store > orders > CurrencyConvert


1 /*
2  * Created on Mar 7, 2005
3  */

4 package com.openedit.store.orders;
5
6 import org.openedit.money.Fraction;
7
8 /**
9  * @author cburkey
10  *
11  */

12 public class CurrencyConvert
13 {
14     public Fraction getMultiplier(String JavaDoc inSourceCountry, String JavaDoc inDesctination) throws Exception JavaDoc
15     {
16           String JavaDoc UrlString = "http://services.xmethods.net:9090/soap";
17           String JavaDoc nameSpaceUri = "urn:xmethods-CurrencyExchange";
18           
19           // create reference ot service
20
/*
21           ExchangeRate exchange = (ExchangeRate)
22               soaprmi.soaprpc.SoapServices.getDefault().createStartpoint(
23               UrlString, // service location
24               new Class[]{ExchangeRate.class}, // remote service interface
25               nameSpaceUri, // endpoint name
26               soaprmi.soap.SoapStyle.SOAP11,
27               "" // SOAPAction
28           );
29           
30           float change = exchange.getRate(inSourceCountry,inDesctination);
31           return new Fraction(change);
32           */

33           return null;
34     }
35     
36     public interface ExchangeRate
37     {
38
39         float getRate(String JavaDoc inSource, String JavaDoc inDest);
40     }
41     
42 }
43
Popular Tags