rest

spring security 3 login programmatically

I'm creating a REST web service using spring and i need to implement login/logout functions in it. The url for the functions should be something like .../api/login and .../api/logout. The username and password will be past using a POST method. I have a services layer below the REST web service. In the service layer i have the "login" an...

How to consume REST service using http POST

I defined a WCF implementation of REST service: enter code here [ServiceContract] public interface IService { [OperationContract] [WebGet(UriTemplate = "customers/{id}", ResponseFormat = WebMessageFormat.Json)] Customer GetCustomer(string id); [OperationContract] [WebInvoke(UriTemplate = "customers", ResponseFormat ...

Using RESTful services with JAX-RS/CXF in Tomcat

I'm interested in using Apache's JAX-RS implementation (CXF) in a Tomcat environment. The documentation is pretty clear and straight forward about developing a RESTful service with JAX-RS/CXF. However, I'm not sure how to develop a JAX-RS service within the context of a Tomcat environment. Does anyone know of a good tutorial on developi...

Building a RESTful delete method URL for a model association

I'm attempting to build a proper RESTful approach at removing a friend while looking at their profile page. I've used this Railscast episode as the basis for my self referential Friendship model, but his approach differs in that he has a page listing all the friendships, with a delete button next to each one. Since he's already iterating...

How to identify the JSON response?

I am developing the REST enabled WCF Service. I am using the following code inside the interface. [OperationContract] //[WebGet] [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)] List<String> GetProjects(); I want the method should return the JSON response. I am pass...

Correct implementation of 300 http respond code in Jersey restful web service for a geo location service

I have a resource .../releases/343/file/21 Depending from where the user access the resource I need to implement a geo balancing mechanism, so I redirect him to a static web server or another. I have something like this : URI uri; if( is_near(user, us) ) uri = URI.create("http://us.static.myserver.com/myfile.tar.gz"); ...

Test jsonp rest app response using httpbuilder

Hi I'm trying to build up a rest Service which provide JSON response. Yesterday i figured about what is JSONP, why to use it an so and so. Today i would like to make some test with my new version of my service. To test it, i use HTTPbuilder. But i can't get it working correctly. Here is the start of my test: def client = new RESTClient...

REST/webservices noob questions

Hello. I'm starting in the web-services world and I have a few questions: From what I've read, REST could be understood as a simple call to a URL which gives a certain expected result. So, what is the difference between a REST web-service and a simple website? Web-services are language-independent. So, if I'm developing a Java-based R...

Problem with same resource, accessible via two routes.

I'm developing simple image sharing site to train my ruby-on-rails-fu. I have following resources in my config/routes.rb file. resources :users do resources :images end resources :images Here's the problem I'm facing - how should I go about implementing functionality like "latest images" and "your image subscriptions"? Having vanil...

Inter-programing language AND inter-server communication?

Are there protocols/solutions/messaging system that allows me to communicate between languages AND servers? Eg. I want to be able to communicate between one server running Java (or Ruby, Python etc) on the backend and one server running Javascript also on the backend. The solution I use now is HTTP REST. Are there other solutions that...

Android - How would you optimize searching in a REST response cache database?

I'm writing a thick client for a REST based web service (for Android). I'd like to cache results that I got from this service, and I'd like to store these results in an SQLite DB. There's a single table in this db, every record represents a past transaction with the web service. In its schema, there's an attribute for: the http reponse c...

Open files from a web application with another web application?

So these days we want things to be on the cloud. In the desktop area we could use one application to create a file, then another to open that file. I wonder how you accomplish this file sharing between web applications? Eg. if I create a web application letting the user create a file, how do I share this file to another web applicatio...

What is vSphere and vCloud ?

Can any one help me in understanding vSphere n vCloud director? And difference in both? How to use vCloud's REST URI's in own Java application once it has been installed? Any Java example of using vCloud REST API will be really helpful..!! :-) ...

Using REST with Delphi

After reading this article about SOAP versus REST I started to wonder what option Delphi developers have on choosing a good REST library to import REST-service functionality inside Delphi/WIN32 applications. And what options there are to create REST services in Delphi. So I have a few related questions: Is there any open-source REST li...

Enterprise Web Services / Date Exchange Suggestions

Hi Lords of the Interwebs, I've got a Silverlight project that I'm just beginning and I thought I would pick your brains a bit. I'm deciding on a data model to communicate from server to Silverlight client. My boss made the comment that he might want that data model to evolve into API's that could be used by various clients in the fut...

Creating an API for mobile applications - Authentication and Authorization

Overview I'm looking to create a (REST) API for my application. The initial/primary purpose will be for consumption by mobile apps (iPhone, Android, Symbian, etc). I've been looking into different mechanisms for authentication and authorization for web-based APIs (by studying other implementations). I've got my head wrapped around mo...

Using Curl to Post to a Restful Rails Application

Could someone enlighten me on how to upload files the RESTful way to a Rails application? I experimented with curl to simulate uploading an image to a rails controller. At first I got authenticity token errors and so disabled them, and then tried curl -F "[email protected]" http://localhost:3000/photos/create but this didn't ...

Google API Request Limit

Does anyone know where I can find Google API Request Limits for their different services? On simulating 500+ concurrent users it seems to fail silently fairly often (maybe 1 in 10 loads) Any ideas? ...

Rails & FreeagentCentral API Usage

Hi Everyone, I have a rails application that uses the FreeagentCentral API to create new projects in FreeagentCentral when a new case is created in my application. Once the case has been created, I link to the created project in FreeagentCentral using the following link code: <%= link_to "#{image_tag('/images/icons/freeagent.png')} F...

Simple URL routes in WCF Rest 4.0 without trailing slash

I have a WCF REST 4.0 project based on the the WCF REST Service Template 40(CS). I'd like to expose simple service endpoint URLs without trailing slashes. For example: CarService.cs http://www.domain.com/cars - GET returns a list of all cars http://www.domain.com/cars/123 - GET returns a single car with ID 123 TruckService.cs http:/...