• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

currency conversion

 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Currently, we have an operator that goes to a currency conversion web page every morning to type in the days conversion rate ( U.S. --> Canadian dollars ). There has to be way to automate this by posting to the government web site or some other site for the conversion rate. How does everyone else update their conversion rates?
Java would be preferred, but all ideas are welcome.
Jamie
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did a quick Google on "currency exchange rates xml" and found lots o hits. The first one:
http://www.oanda.com/channels/business/FXML.shtml
is a commercial service. Ya gotta pay. Looks like FXML is the standard, Google on that again for more.
This may quickly lead to your next question if you haven't done it before - how to consume XML web services!
[ May 16, 2003: Message edited by: Stan James ]
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stan James:
...This may quickly lead to your next question if you haven't done it before - how to consume XML web services!

Right on the money! Actually, if XML services are the only option, then I have no problem buying a book and learning. I'm more partial to a free service, but will pay if there are no reliable alternatives. I also don't limit myself to java, if anyone has any other java or non-java alternatives.
Jamie
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can find a WebService that provides this accurately and use it to check automatically. I found a couple, I don't know how accurate they are but, it quick and easy to test them:
http://www.xmethods.com/ve2/ViewListing.po%3Bjsessionid%3DBgbEY7AOqfXKPATnAxqbS-T0%28QCcd0CRM%29?serviceid=5
http://www.webservicex.net/WS/WSDetails.aspx?CATID=2&WSID=10
This one is actually a subsciption service so...
http://glkev.webs.innerhost.com/wswebclient/wsclients.aspx
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Consuming a WebService from java is simple. I recommend Axis for this. See the docs on Cunsuming WebService. You can have these running in minutes!
http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-axis/java/docs/user-guide.html
Actually the Reference guide might make it easier
http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-axis/java/docs/reference.html
[ May 16, 2003: Message edited by: Carl Trusiak ]
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, here's the skinny. This is supposed to be a small task. I think that learning SOAP, XML, AXIS, Web Services for this piddly little task might be overkill not to mention that we don't have a webserver, or any of that web jazz. The environment I work in only utilizes core Java, and some fringe network stuff like LDAP, and security, but nothing fancy.
I still believe that somewhere, someplace there is a core java URL/URLConnection that can do this.
Thanks for the suggestions, if I get time to pursue the above suggestions and technologies, I'll pick up a book and learn it. But at this point, I'd rather just leave the Operators to go to the website and manually enter this into the database.
Jamie
Jamie
[ May 16, 2003: Message edited by: Jamie Robertson ]
 
Bartender
Posts: 1844
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would see if any of the services provide XML data streams. You could open up a java.net.URLConnection to the provider and obtain the XML data stream , parsing it with the javax.xml package.
I did just this to obtain real-time airline information for a limousine company who needed to see if thier clients' flights were delayed. (And thus could dispatch the drivers at a later time, so the drivers wern't waiting time waiting at the airport for a delayed flight...)
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Joel McNary:
I would see if any of the services provide XML data streams. You could open up a java.net.URLConnection to the provider and obtain the XML data stream , parsing it with the javax.xml package.
I did just this to obtain real-time airline information for a limousine company who needed to see if thier clients' flights were delayed. (And thus could dispatch the drivers at a later time, so the drivers wern't waiting time waiting at the airport for a delayed flight...)


This is what I was looking for. Just needed to know if it was possible. I'll have to contact some companies to see if this is possible. If anyone else has any leads or has done this before let me know of a service provider or such.
Anyone that wants to post the fully commented production worthy code do so right this instant because this is urgent, Urgent URGENTTTTTT! Just kidding, this can wait for awhile but the above is always welcome. Thanks again to all replies ( past and future )
Jamie
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jamie Robertson:
OK, here's the skinny. This is supposed to be a small task. I think that learning SOAP, XML, AXIS, Web Services for this piddly little task might be overkill not to mention that we don't have a webserver, or any of that web jazz. The environment I work in only utilizes core Java, and some fringe network stuff like LDAP, and security, but nothing fancy.


I really can't express how easy this is with Axis. The learning curve you will have to get a simple client up and running is small. You needn't worry about all the details at first. I could sit down tonight and have an operating interface to all of these in no more than 15 minutes! At that point, it's a matter of running each and testing against the values the clerk looks up to see which service provides the accuracy you need. The only thing you need to leatn first is wsdl2java. It will create the client side code for you, you simply instanciate it and make the method call.
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Frank, this is the problem:
From the Axis Docs -->
"See the Axis Installation Guide for instructions on installing Axis as a web application on your J2EE server." I don't have a J2EE server to work with, only a DBServer with internet access. I was thinking of running a batch job once every night, posting to a web site and parsing the result. From there I'd update the database.
 
reply
    Bookmark Topic Watch Topic
  • New Topic