rest

Network ActiveRecord relation with Rails

Hi, I have a has and belongs to many relation between User and Article models, and I would like to link them even if an article if not hosted on the same database then a user. For example, If an article exists at foo.com/articles/3 and a user exists at bar.com/users/1, If would like to be able to do from foo.com web interface or bar.co...

RESTfully Nesting Resource Routes with Single Identifiers

In my Rails app I have a fairly standard has_many relationship between two entities. A Foo has zero or more Bars; a Bar belongs to exactly one Foo. Both Foo and Bar are identified by a single integer ID value. These values are unique across all of their respective instances. Bar is existence dependent on Foo: it makes no sense to have a...

RESTful Http DELETE method in .NET

I am new to web services. I am dealing with testing APIs in my project. In the previous version the company used GET and POST methods but not PUT and DELETE methods. I need help for the HTTP DELETE method. I have browsed various websites where I found the example code snippets for GET and POST methods, but not for DELETE and PUT methods ...

Create Hello World with RESTful web service and Jersey

I follow tutorial here on how to create web service using RESTful web service and Jersey and I get kind of stuck. The code is from HelloWorld3 in the tutorial I linked above. Here is the code. I use Netbean6.8 + glassfish v3 RESTGreeting.java create using JAXB. This class represents the HTML message in Java package com.sun.rest; im...

Is there a good example of a root directory of a REST /JSON api

Is there a good example of a root directory of a REST /JSON api ...

Qooxdoo REST JSON request problem - unexpected token and then timeout

Hello! I am learning Qooxdoo framework and I am trying to make it work with a small Django web service. Django webservice just returns JSON data like this: { "name": "Football", "description": "The most popular sport." } Then I use the following code to query that url: var req = new qx.io.remote.Request(url, "GET", "application/json...

Flex 4 front end connecting to Java Jersey Web Service

I created a Java REST service using Jersey. I use three of the HTTP "verbs" GET, POST and DELETE. I want to create several prototype front ends for the service. After much research, a lot dating to 2008 and 2009, I have been unable to find anything remotely simple. My three options are: 1) resthttpservice. This project hasn't been upda...

Designing Web Service Using Ruby on Rails - Mapping ActiveRecord Models

I've put together a RoR application and would now like to publish a RESTful web service for interacting with my application. I'm not sure where to go exactly, I don't want to simply expose my ActiveRecord models since there is some data on each model that isn't needed or shouldn't be exposed via an API like this. I also don't want to c...

User authentication on a Jersey REST service

I am currently developing a REST application, which is using the Jersey framework. I would like to know a way that I can control user authentication. I have search a lot of places, and the closest article I have found is this: http://weblogs.java.net/blog/2008/03/07/authentication-jersey. However this article can only be used whith a Gl...

WebOperationContext behavior for non REST WCF Services?

What happens in my service method if I use a WebOperationContext, when the endpoint is not REST? Justification: I have a service that I'm exposing as both REST and SOAP. ...

WCF Global(.asax) Behavior

Hi, I want to create a global option that when a REST call contains &format=json to output the response as a JSON string. If I enter the following String in my method it works: WebOperationContext.Current.OutgoingResponse.Format = WebMessageFormat.Json; However, if I add this line, anywhere in my Global.asax file, I get a nullExcept...

How to call a service operation at a REST style WCF endpoint uri?

Hi, is it possible to call a service operation at a wcf endpoint uri with a self hosted service? I want to call some default service operation when the client enters the endpoint uri of the service. In the following sample these uris correctly call the declared operations (SayHello, SayHi): - http://localhost:4711/clerk/hello - htt...

How do I control when the Undo button is clickable in a Rich Text Editor using YUI?

Right now I have a page with 2 tabs. When the EDIT tab is clicked a YUI rich text editor will load up and create the toolbar and textarea to edit. I then will do a RESTful GET call to retrieve the data and then set it to the textarea value. This causes the Undo button to be clickable since the value was originally empty and then text was...

How to integrate a RESTful webservice into SSIS

I have an extremely simple RESTful webservice (i.e. www.test.com/test.xml?date1=05/252010&date2=05252010) That returns fairly simple XML. A client is interested in consuming this webservice via SSIS and importing it into a table. Whats the best way to call a RESTful webservice with SSIS - all of the examples I have seen revolve aroun...

getting internal server error using rest-client in ruby to post to HTTP POST

Hi, this is my code and I don't know how to debug it because I just get an "internal server error": I am trying to HTTP POST to an external ASPX: def upload uri = 'https://api.postalmethods.com/2009-02-26/PostalWS.asmx' #postalmethods URI #https://api.postalmethods.com/2009-02-26/PostalWS.asmx?op=UploadFile #http://www.p...

A sports events & results API?

Anyone knows a sports events & results API. Something that can give me info on teams, venues, matches, players, scorers & results. ...

Using Javascript to call the Azure Blob Storage REST API

I'm developing a Flash app that saves files to the Azure Blob Storage API. I've learned that you should use the REST API directly rather than a go-between WCF service as this is the most efficient (using a web role is a bottleneck). The problem is that Flash can't do PUT or DELETE methods over Http and has to use external Javascript. ...

How to add group using RESTFUL interface in Crowd

How to add group in Crowd using RESTFUL interface? ...

Why does my REST request return garbage data?

I am trying to use LWP::Simple to make a GET request to a REST service. Here's the simple code: use LWP::Simple; $uri = "http://api.stackoverflow.com/0.8/questions/tagged/php"; $jsonresponse= get $uri; print $jsonresponse; On my local machine, running Ubuntu 10.4, and Perl version 5.10.1: farhan@farhan-lnx:~$ perl --version This...

Centralized way of organizing urls in Jersey?

Forgive me if I am asking an obvious question (maybe I missed it in the docs somewhere?) but has anyone found a good way to organize their URLs in Jersey Java framework? I mean organizing them centrally in your Java source code, so that you can be sure there are not two classes that refer to the same Url. For example django has a reall...