rest

Passing Validation exceptions via WCF REST

I am using WCF and REST, and I have complex types, which are working fine. Now I need to check for validation, I am thinking of using DataAnnotations e.g. public class Customer { [Required] public string FirstName {get;set;} } Now where the issue is how do I pass this validation down to the REST service? ALso I need to validat...

Way to maintain a session in a REST application

We have a REST application that is utilized mostly by applications that dont need to maintain their state, so till date we have been quiet "RESTFUL" without maintaining a state. We use the Private/Public (similar to Amazon) for authentication.Currently the client passes the credentials for every request Now we have a new requirement wh...

NHibernate WCF Rest IIS7 Fails with Security Exception

Here is the error: System.TypeInitializationException: The type initializer for 'NHibernate.Cfg.Environment' threw an exception. ---> System.Security.SecurityException: Request for ConfigurationPermission failed while attempting to access configuration section 'hibernate-configuration'. To allow all callers to access the data for ...

How to do REST securely and with sensitive data?

Hello, we are implementing a new web service. The web service will be a store of sensitive data and there are multiple users types with different permissions. So some user types can't access(and some can't change, and so on) certain types of data. How would this work in REST? I'm very new to REST, so sorry if this sounds noobish. ...

Generate a controller with all the RESTful functions

Hello, I am trying to generate a controller with all the RESTful actions stubbed. I had read at link text that all I needed to do was to use call the generator with just a controller name I would get just that. So, I ran "script/generate rspec_controller Properties" and I got an empty controller. Any other suggestions would be great...

Facebook RESTful API require_login() callback

Hi, I'm trying to authenticate a user through the RESTful API (not Connect) but I can't since the callback system does not work for me. I have a local app that creates the Facebook API object with my key and secret, then calls the Facebook API require_login() method; I am sent to Facebook login, I login, and then I am sent to http://www...

Implement Rest interface with Python + WSGI

Hi, I need to implement REST web services using Python. I am using Apache web server with WSGI module. I found lot of frameworks to implement the REST like Django, bobo, etc..I am confused which one to use. Can anyone suggest me a framework which i can use for this scenario? Anandan ...

ASP.net error message when using REST starter kit

Hi all, I've written some code using the REST starter kit and it works fine on my development machine. However, when I upload it to our server the page gives me the following error message... CS1684: Warning as Error: Reference to type 'System.Runtime.Serialization.Json.DataContractJsonSerializer' claims it is defined in 'c:\WINNT\a...

Restful authentication between two GAE apps.

Hello everyone, i am trying to write a restful google app engine application (python) that accepts requests only from another GAE that i wrote. I dont like any of the ways that i thought of to get this done, please advice if you know of something better than: Get SSL setup, and simply add the credentials on the request that my consumin...

Re-designing 37signals paths to be hosted under a single domain

37signals is a web app company. Some of their applications: basecamp, to manage projects highrise, to manage contacts backpack, like a wiki they use different domains for each application (basecamphq.com, highrisehq.com, etc) in basecamp, this is the address of a particular comment for a post in a project of my company (acme) https:...

how can I future-proof migration of a ADO.net local data layer to a future web based interface (web-service or REST)?

Hi, BACKGROUND: I am working on a .NET WinForms application now (C#) with an ADO.net database for the data layer. QUESTION: How an I develop this now such that it would be easy to migrate to a model where the data layer is abstracted via a HTTP web-service or REST interface? For example would just use of a standard C# interface with...

Is it possible to use HTTPS with OpenRasta?

Does anyone know if it is possible to use HTTPS with OpenRasta rather than plain HTTP? I need HTTPS so that sensitive information can be transferred without any risk.. ...

Getting error detail from WCF REST

I have a REST service consumed by a .Net WCF client. When an error is encountered the REST service returns an HTTP 400 Bad Request with the response body containing JSON serialised details. If I execute the request using Fiddler, Javascript or directly from C# I can easily access the response body when an error occurs. However, I'm us...

Generate XSD from my model

I am writing a WCF REST service, and I am needing to generate my XSD's which provide the information for my models. What is the easiest way of doing this? It would be nice to have it generate the validation within the XSD too, if possible? ...

How to consume REST in C# including PUT, POST and DELETE?

Hello, I have a REST webservice that I need to consume in C#. I need support for more than just GET requests though. I need everything that is done by REST including GET, PUT, POST, and DELETE. What is the best way of interfacing with this? I do not see anything for HTTPRequest to be able to do POST or anything other than GET unless you ...

RESTful WebServices with Kohana PHP 3

Hi, Is it possible to make restful services with kohana 3 , i reviewed the source and found an abstract class Kohana_Controller_REST, how to use it ? If someone can post a snippet with routing as Example code, it will be very appreciated. Also, the lack of documentation on KO3 is making me crazy, if someone knows a well documented, fa...

Web Servers and REST Methods

Most web browsers support only HTTP methods like GET and POST and do not support PUT and DELETE. If so, does web servers like IIS and Apache support it? Why should them support if the web browsers don't supports them? Those methods can be used for something else? ...

Using RESTful Rails, How to Do an Insert and Create in One Action

I have a link on a website that says "add object". When I do this, an AJAX call is made and I want to do the following things: 1) if the container in the session does not exist, create one, else use existing 2) add the object to the container I'm new to RESTful design and am wondering how to best accomplish this in Rails. Step #1 in pa...

WCF REST: Is it possible to remove the namespace added to my response XML?

I want to remove the default xmlns (namespace) added to my service's response (see image below) Is there a way to do this? This because in order to consume this service from a C# windows app, I have to add the namespace to every data object's header - DataContract that I will be serializing. ...

Looking for Suggestion on Multi-Consumer Service Development

How would I model a system that needs to be able to provide content in a format that would be consumable by iphone, Android or web browser (or whatever). All a new consumer would have to do is build a UI with rules on how to handle the data. I'm thinking something RESTful returning JSON or something. I'm really looking for suggestions ...