| Author |
Implementing a client which uploads a file through Rest
|
vaibhav mishra
Ranch Hand
Joined: Jun 18, 2008
Posts: 168
|
|
|
I want to implement a client in java which can upload a file through a Restful web service,I tried online examples but most of them reies on using JSP and servlet, and I am not able to comprehend how to do the same in the rest way, the only requirement I have is client is in java(not a web application, but a desktop application) , the rest service through server would be in any technology(as simple as possible) , can anybody recommend some pointers or tutorials to do the same
|
SCJP
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
RESTful calls can be made over HTTP, in fact the are in your case just straight HTTP calls (GET, POST, PUT, DELETE). So using something like HttpClient from Apache as a helper library will allow you to make calls to a server.
On the server side the service just has to respond to this HTTP request. I've found a nice way to do this is using Spring's 3.0 M3 RESTful support (which basically uses annotations to make dealing with REST requests really trivial).
Hope that helps a little!
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
 |
|
|
subject: Implementing a client which uploads a file through Rest
|
|
|