This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

REST api  RSS feed

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been searching the web but i cannot find a tutorial in how to call REST methods on a server.
Looking to integrate some geocoding and social network methods on my site. Anyone have any tip/tuts out there?
 
Sheriff
Posts: 23640
48
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those "REST" methods are just plain old HTTP requests. Much simpler than other forms of web service. We are doing geocoding where I work, we send the address to Google and (usually) get latitude and longitude back buried in an XML document. We use the Apache HttpClient software to do that and there's about 25 lines of code.
 
Joshua Elkino
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mind showing me an example? Are you using the javascript api? I want to do this on the server side since i dont trust js too much
 
Bartender
Posts: 9507
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Accessing the Google Geocoder with Java is simple. Here is how to construct the URL.
Be aware that there's a throttle on how many requests you can make per minute (you'll get HTTP errors if you send too many) and per day (50000 if I remember correctly)
 
Joshua Elkino
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe,
I'm quite aware of the JavaScript methods to use gMaps, but i'm looking for a server side (JAVA) equivalent, thus my inquiry for how to call REST methods.

Lets take OpenSocial API as another example.. it can be called using JS, REST, and RPC... http://code.google.com/apis/opensocial/docs/index.html
how would i use their API?
 
Joshua Elkino
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well i finally found something simple!
http://developer.yahoo.com/java/howto-reqRestJava.html

Hope if anyone has a similar Q they can just look at this page for a simple example and modify it to work with their needs.
 
Joshua Elkino
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a real example
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!