rest

RESTful concerns

I have question regarding RESTful resources similar to this other question. We're also developing an iphone app that will access the REST services but one of the concerns is that the first screen makes a few calls to the service and that it should be just one (A dto of the resources). I'm trying to keep the service as RESTful as possib...

Creating a RESTful application in Zend

I have a controller that extends Zend_Controller_Action. It contains some actions that I need to give people access to via a RESTful MVC web service. I've seen some articles that have told me to extend using a different class (Zend_Rest_Controller) but this seems to mean I need to override certain abstract methods and really I no use fo...

Pre-generation of resource representation

The assumptions that I have are - Representations have a definition which have its last modified date. E.g., Script that generates a JSON representation of a resource has when the script has been last modified. Resource's persistent storage does not have any storage limitation Now the situation is that I have Resources for which thei...

RESTful routes for has_many :through relationships?

I have 2 models - User and Activity - which are related by a has_many :through using the UserActivity model. A User can either "want" or "done" an activity, which creates a UserActivity record and sets the appropriate boolean. What would you recommend for handling these actions when creating routes and controller actions? Would somethin...

What is the best way to implement web services in Python?

What is the best way to implement web services in Python? ...

Are RESTful paths the right thing for session settings?

I have a dilemma. My web application deals with subjects like people, places, assets (e.g. images), tags, etc for which I am using RESTful routes generated by map.resources in my routes.rb. Visitors can set various options for viewing this data, e.g sort order, selection my asset type, owner, or associated tags, and type of view. Thes...

REST and JAVA JPA

I am trying to understand the code of some project which is not properly documented.Am the only developer working on the task.I dont have much experience. There is a data model and there are some classes witten to access it.It was mentioned that the data model has some rest api on top of it.But when i see the code i can see getter cod...

How to return a plist using the restlet api

Hi, does anyone know how to return a plist / property list using restlets REST api? I'm connecting to my iPhone app and objective-c works much nicer with plists. ...

RESTful URL structure for displaying local data

I am developing a web app which displays sales from local stores around the United States. The sales and stores listed vary by location. Is there a RESTful URL scheme for describing this information while avoiding duplicate content? Specifically, the app needs to list local stores, and list items sold at a particular store. Zip (postal)...

Get a member URL action with ActiveResource

I have a route in my application that is like this: /deployments/:id/logs.json It is used to retrieve logs for a specific deployment. On my client code, based in ActiveResource I have this: logs = Deployment.find(deployment.id).get(:logs, opts) Where opts is some parameters that I send via query string. The problem with this code...

Why do I need to define a action in routes manually sometimes, and sometimes not?

Suppose i have indicated that network is a resource. I am adding a new action, say "submit_question_for_network" to the controller. However, after I added the action to the controller, it does not work # does not work /network/submit_question_for_network # need to add to :collection map.resources :network, :collection => {:submit_...

How to run the Java file in Netbeans to get the xml file generated

Hi , i am new to using Jersey to call my Rest API's . i have written a BlogBean in NetBeans and i run the code which shows me Build successfull . But the result xml is not coming in the output.. What could i have to do for resolving this ?/ ...

Scala framework for a Rest API Server?

Hi, We are thinking on moving our Rest API Server (it is inside the web service, on Symfony PHP) to Scala for several reasons: speed, no overhead, less cpu, less code, scalability, etc. I did't know Scala until several days ago but I've been enjoying what I've been learning these days with the Scala book and all the blog posts and quest...

Can a Jersey GET request return a polymorphic entity?

I've got a Resource class that attempts to return an interface type, say "Shape": public interface Shape {...} @XmlRootElement public class Circle implements Shape {...} @Path("/api/shapes") public class ShapeResource { @GET @Path("/{shapeId}") public Shape get(@PathParam("shapeId") String shapeId) { .... r...

Documenting WCF RESTful service through the Service help page

I'm using the RESTful service starter kit and was having trouble adding documentation to the built in Service help page. I'm able to add documentation to each method in the Description using the WebHelp attribute. What I need and want to add documentation to the Request Schema that is generated for each method through the Request Schema...

No available client connector supports the required protocol: 'HTTP'

Greeting. I am playing with Restlet framework, when I am running following code getting and exception Internal Connector Error (1002) - No available client connector supports the required protocol: 'HTTP'. ClientResource cr = new ClientResource( "http://127.0.0.1:8888/user/123"); UserResource resource = cr.wrap(UserResource.class); User...

Problem Implementing WebInvoke Method="POST" for a REST Service on WCF

Hi all and thanks for your time in advance. I have a problem trying to get to work a REST method under WCF. The method is POST, and I'm not able to retrieve the values sent from the Request. This is how I declare the service according to an exemple from Microsoft about the WebInvokeAttribute Class: [OperationContract] [WebInvoke( ...

Best way to access a Rails 3 REST-ful web service using a VB.NET consumer?

What is the best way to access a Rails 3 REST-ful web service, developed using standard Active Resource techniques including HTTP authentication over SSL, from a VB.NET consumer? Consumer can be .NET 4.0 if that is necessary. Are there any .NET libraries yet that can bridge the gap? I have already come across links like this (http://...

how can mvc return Unauthorized code without redirecting to LogIn view

My MVC web application serves two types of users. First one over standard web browser Second one over REST returning only Json data. Both requires Authentication and authorization. Both scenarios are differentiated based on the route so that i know what content to serve. When users access the application, if they are not logIn the appl...

Using RestTemplate, how to send the request to a proxy first so I can use my junits with JMeter?

I have a web service running on my dev box implemented using Spring-MVC 3.0. I have various JUnits that test against that service using RestTemplate. What I would like to do is have JMeter pick up those JUnits REST requests when I run them. However, to do that, I need to have Spring's RestTemplate send them to the proxy that I'm running ...