aspose file tools*
The moose likes Java in General and the fly likes Implementing a client which uploads a file through Rest Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Implementing a client which uploads a file through Rest" Watch "Implementing a client which uploads a file through Rest" New topic
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: 3274
    
    5

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Implementing a client which uploads a file through Rest
 
Similar Threads
Get an OpenID token from a REST call
Help needed on restful web services
Web Service cleint error:urgent
web service not available
RestFul web services with Axis 2