rest

Authentication in WCF REST Routing Scenario

I developed a WCF REST Router which redirects incoming messages to WCF REST targets by inspecting the message, changing the message.Headers.To uri and forwarding it to the target. Now I would like to use Basic and NTLM authentication. The authentication of the client against the router works fine. But I need the router to authenticate t...

Creating an web API in ASP.Net

Hi, I'm looking to create an API for a website I have built. The API will be built in ASP.Net - probably using VB and will need to be consumed by multiple platforms including PHP. I've read a bit about REST vs. SOAP APIs and am confused about which route I should go. I also need some examples and frameworks I can use to get started. T...

Continuously poll a REST service in Grails

Hi! I am creating a web app in Grails and I would like to continuously (every 5 minutes or so) poll a REST service using GET, which retrieves a series of messages (or possibly none, it depends) and once it is donde, my application should save the retrieved data as an object and store it in my database. The problem is that I have no idea...

NullPointerException in SchemaParsingConfig.setFeature() running Axis2 WSDL2Java

In the process of my daily work, I am trying to use the WSDL and XSD from this article: http://www.ibm.com/developerworks/webservices/library/ws-restwsdl/ as a template from which to generate some java code. My desire is to use the generated java code to in some way validate that my (to be) hand-rolled WSDL and schema are reasonably s...

How would I create an asynchronous notification system using RESTful web services?

I have a Java application which I make available via RESTful web services. I want to create a mechanism so clients can register for notifications of events. The rub is that there is no guarantee that the client programs will be Java programs and hence I won't be able to use JMS for this (i.e. if every client was a Java app then we coul...

How to authenticate one Ruby on Rails app to another, using RESTful_authentication gem?

Anybody have any ideas? The situation is like this: I have a primary rails app and an auxiliary one. The auxiliary app is used to transform a web service request into a RESTful PUT to the main app. The resource the auxiliary app is attempting to add to requires authentication. Any ideas would be much appreciated! Thanks SO! ...

REST vs. RPC

Hello, I'm building my own ajax website and I'm contemplating between REST and RPC. If my server supported Servlets I'd just install persevere and end the problem but my Server doesn't support Servlets. RPC is simpler to code (imo) and can be written in PHP easily. All I need is a database query executer. I'm using the Dojo Toolkit an...

WADL/WSDL 2.0 for RESTful services in Ruby on Rails

Is there any way of publishing the parameters expected by the RESTful methods in Ruby on Rails? Using SOAP, we can use WSDL, but does RoR implement WADL or WSDL 2.0 for RESTful services? Edit: I am aware of a SOAP based solution using ActionWebService. I was refering to a RoR equivalent of https://wadl.dev.java.net/ ...

Reading a cookie from a WCF RESTful webservice

Writing a suite of IIS hosted WCF webservices (both GET and POST), and I need to be able to read a cookie for an authentication token so I know the user has been auth'd previously. Will HttpContext.Current.Cookies give me what I need or is there something cleaner and more appropriate for a WCF web service with WebGet and WebInvoke attri...

Is there any reason not to use HTTP PUT and DELETE in a web application?

Looking around, I can't name a single web application (not web service) that uses anything besides GET and POST requests. Is there a specific reason for this? Do some browsers (or servers) not support any other types of requests? Or is this only for historical reasons? I'd like to make use of PUT and DELETE requests to make my life a lit...

Sending custom HTTP error information to Flash, JavaScript, etc.

I'm developing a REST API at the moment, and one of the core features of this is that is uses a variety of HTTP status codes to return status/error information, some of which may be extended information (e.g. if an item is not found, some other similar items) which will be in the response body. This is fine until you get to 'crippled' c...

Is requiring a REST api request to include a cookie a good idea?

My idea is to treat URI's in my rest api as a unique resource, except in the context of the client's location, which is stored in a cookie. Are there any downsides to this approach? ...

Twitter REST change "from API" to something meaningful

When using simple request to post to Twitter the messages are signed with "sent from API". Is there a way to change that to the actual name of your application? Is it another post parameter or something else? ...

Using Yahoo Fire Eagle on Grails / Java

Hi everyone! Has anyone implemented the Yahoo Fire Eagle API in a Java / Grails application? How did you do it? I want to poll their REST web service with my Grails application. Yahoo offers some API Kits for various programming languages such as PHP, Ruby, etc. Unfortunately, there is nothing similar available for Java / Groovy (there...

What's the restful way to implement a forgotten password feature?

I have the following restful structure: My login page uses the session/new action My signup page the users/new action My logout page uses the session/destroy action My register process uses the users/create action I need 3 more actions for: I forgot my password page Start forgotten password action (send email) Reset passwor...

Validate no routing overlap when creating new resources in Ruby on Rails

I've got a RESTful setup for the routes in a Rails app using text permalinks as the ID for resources. In addition, there are a few special named routes as well which overlap with the named resource e.g.: # bunch of special URLs for one off views to be exposed, not RESTful map.connect '/products/specials', :controller => 'products', :ac...

Can I setup routes in Kohana to only match particular HTTP methods (GET/POST/etc)

I'm exploring a few PHP frameworks and the current front runner is Kohana. Having a Rails background I've become used to what the rails community calls "RESTful" routes. So a "GET /posts" displays all posts and is handled by the index method of the Posts Controller. A "POST /posts" creates a new post object and is handled by a different...

Which HTTP Method to use in these RESTFUL use-cases?

Hopefully someone can help me out on this one. Consider the following use-cases: Add a Role to a User Remove/Revoking a Role from a User The interface into the system is RESTFUL. When adding a role the following URL is used: PUT /user/{userId}/role/{roleId} When removing/revoking a role from a user the following URL is used: DE...

RESTful API vs Web Service API

I am looking at doing a small web application for learning purposes, using .NET. My conundrum is whether I should be exposing application logic to other sites and applications via a REST API, or a set of Web Services. I am familiar with web services, but have not worked with REST. I understand the concepts of REST, I just have no pract...

How to web enable .NET libraries

I am looking to expose my existing .NET libraries to an intranet. With many moving to RESTful services, OpenRasta looks tempting. In a similar vein, I am playing around with Sinatra in IronRuby. I am primarily looking for 3 points: 1) What are you using to expose your existing codebase to the web? 2) What about your method makes it eas...