rest

Should I describe REST services in a machine readable format?

Most REST interfaces I see are described with a simple web page describing the URL, the method, accepted input and returned result. For example the Amazon S3 or the Twitter API documentation. But why should I settle with what is apparently good enough for Amazon or Twitter... So, is it worth describing a REST API in a machine readable f...

RESTful web services, .net compact framework, and the many HTTP methods

Hey all, I have recently decided that a client/server application I am building (where the client is a Windows Mobile device running .netcf 3.5) would, ideally, utilise a lightweight web service conforming roughly to the principles of REST. Is there a way (and if so what is the easiest way) to implement the most common HTTP methods us...

[JSF + REST] Dynamically generated GET request to an external database

Hello, I'm asking for help to my problem. I am new to JSF and I have a simple JSF online store demo page. I don't even use navigation rules since I only include the page with search results beneath the searching tags fields. The problem is a have sth like 15 fields (input texts and menus) to perform a detailed search. After selecting th...

Why do we need RESTful Web Services?

I'm going to learn RESTful web services (it's better to say that I'll have to do this because it's a part of CS master degree program). I've read some info in Wikipedia and I've also read an article about REST at Sun Developer Network and I see that it's not easy technology, there are special frameworks for building RESTful apps, and i...

How to implement WCF REST in ASP.NET

I'm trying to write a re-usable .NET Assembly that implements WCF. My current problem is how to take the assembly (appropriately decorated with ServiceContract, DataContract, and WebGet attributes) and reference it in my existing ASP.NET WebForms application and expose it using REST. Ideally I like different endpoints for JQuery compat...

Is the end of SOAP near?

Following "A well earned retirement for the SOAP Search API" from Google announcing they have recently removed their SOAP APIs, I'm curious what the community thinks of SOAP in 2009. I can see its use for remoting and more verbose client-server stateless communication, but for more generalised [Ajax] web usage is it now redundent? Have ...

Put or Post for Email Form with Log Attachments

Hi i am writing a restful webapp using Spring 3. Part of the app is a form which when submitted triggers the sending of an email with various application log files attached. I'm not sure whether i should handle this form submission as a 'POST' or a 'PUT'. My issue is that structurally the process would seem to be idempotent (and there...

Problem sending Apple Push Notification using Java and REST.

Hello there, This is a follow up to my previous posting on StackOverflow. Figured its better to start a new post (since I made more progress than before) rather than appending a new question on a previous thread. Am using the Javapns library on Google Code to send an Apple Push Notification through a REST based web service... Here ar...

Using CDATA with WCF REST starter kits

Hey Everyone, I have a service built using Preview 2 of the WCF REST starter kit, but I've run into an issue with passing around xml-styled data in the calls. Here's my request object: [DataContract(Namespace = "")] public class ServiceRequest { [DataMember] public string ContentText { get; set; } [DataMember] public s...

How to limit the resource formats in the Rails routes file

When routing resources in Rails the optional format attribute is automatically appended to the generated routes. This is so that the resource in question can be requested as either XML, HTML etc. Which formats that is actually allowed is usually described in the controller using respond_to. But in many cases you only want to support HTM...

REST service: Get Request to a URL with a special string parameter

I wrote a simple REST Collection WCF service with REST Start Kit Preview 2. The template project provides a Service class with a Dictionary collection instance as its internal collection items. Each item has a key and a value. The problem is that if the key contains a '.' such as 'ProductA.Item1', then my query to a specific item will n...

REST Service with Load Balancing

Hi all, I've been considering the advantages of REST services, the whole statelessness and session affinity "stuff". What strikes me is that if you have multiple deployed versions of your service on a number of machines in your infrastructure, and they all act on a given resource, where is the state of that resource stored? Would it ma...

EventBrite API to add a attendee programmaticaly

EventBrite Api allows you to manipulate the EventBrite system pretty much completely. The only missing method is to Add an Attendee. Has anyone overcome this problem? ...

Compatibility of HTTP status.

I'm currently implementing a RESTful API (nothing serious, just for a blog engine i'm developping for fun) and i've some questions about HTTP status compatibility. To create a new blog post i have to do a POST request, if every thing goes fine, the post is created and then returned in the format corresponding to the request. I read on ...

Spring 3.0M4 and passing objects as parameters to POST

Hi guys, I'm quite sure this has to be in the docs somewhere, but I've looked for days and haven't spotted it. I'm probably staring myself blind when it's right in front of me, so sorry for asking an abvious question, but.... @RequestMapping(method = RequestMethod.POST) public ModelAndView post(@ModelAttribute("user") User user) { Mo...

If POST to an URL and how can I tell the client to look at a fragment of the response?

I would like to POST an entity as follows POST /example.org/MyEntity/100 Based on the passed entity, the server would like to draw the users attention to a particular part of the response using a fragment identifier. e.g. /example.org/MyEntity/100#InterestingPart How do I return this new URL to the client. I am assuming I could do...

Transaction in REST WCF service

We are having a REST WCF service. we want the save operation on this REST service to be in transaction. Is there a way to pass Transaction object over the wire to REST WCF service? ...

How to handle avatar upload in REST manner

I have User model, where user should be able to upload one picture as an avatar. But I don't really know how to implement this in correct REST way. I see two options First I think of avatar as of member resource that belongs to user, so I add two actions to my Users Controller, one avatar for the upload form, and second action for handl...

RESTful web services: trying to achieve HATEOAS with custom XML

Hi there, I am working on an enterprise system that will utilise a RESTful web service between mobile clients and a central server. As RESTful as possible, let's say. My question relates to HATEOAS (hypermedia as the engine of application state), and the use of custom xml in HTTP response bodies. This system will never ever be used by...

Interpreting Accept Headers as intended in IE and Webkit

I developed a web app that responds with data in the format as specified by the client in the HTTP Accept Headers. Everything worked fine while using Firefox, but when I wanted to check my CSS / HTML on Chrome and IE, both of them wanted to download the index page, as if it's an unknown content type. After some research I found this art...