rest

Using RestructuredText and Sphinx to include a preformatted file.

I'm trying to make this fragment work: Version History --------------- These are the versions over time:: .. include:: ../../CHANGES.txt That is, use the include directive so that a file is included as a block quote. Once inside a block quote, the directive is quoted. I want the contents of the file in a block quote. Any ide...

Specifying locale for http request/response

I have a ReSTful web service which needs to parse locale-sensitive data from the request. This data could either be in an XML body or part of the query string. Is there any acepted way of determining which locale the data is being sent in (and by extension the locale in which the response should be sent)? One option is simply to specify...

curl POST to RESTful services

Hello All, There are a lot of questions on Stackoverflow about curl but I could not figure out what is that I am doing what I am not supposed to. I am trying to call a RESTful service that I had written using Jersey API and am trying to POST an xml string to it and I get HTTP 415 error which is supposed to be a Media Type error. Here i...

Custom Response + HTTP status?

Hi, I have a rest interface for my project. For one class i have a POST method where you can post an xml and i RETURN a custom response like: <customResponse>Invalid email</customResponse> if the email from the xml which was posted, was incorrect + other custom messages i have defined for different situations. For all of these the HTT...

Combined SOAP/JSON/XML in WCF, using UriTemplate

I'm trying to build a generic web service interface using WCF, to allow 3rd party developers to hook into our software. After much struggling and reading (this question helped a lot), I finally got SOAP, JSON and XML (POX) working together. To simplify, here's my code (to make this example simple, I'm not using interfaces -- I did try t...

Rails new vs create

Why is there a need to define a new method in RESTful controller, follow it up with a create method? Google search didn't provide me the answer I was looking for. I understand the difference, but need to know why they are used the way they are. ...

SOAP, REST or just XML for Objective-C/iPhone vs. server solution

Hello, We are going to set up a solution where the iPhone is requesting data from the server. We have the option to decide what kind of solution to put in place and we are not sure about which way to go. Regarding SOAP I think I have the answer, there are no really stable solution for doing this (I know there are solutions, but I want...

Building URL or link in REST ASP.NET MVC

I want to build a URL at runtime when a resource is render to either XML or JSON. I can do this easily when the view is HTML and is rendering only parts of the resource, but when I render a resource that contains a links to another resource I want to dynamically generate the correct URL according the host (site) and resource specific URI...

How to customize RESTful Routes in Rails (basics)

I have read through the Rails docs for Routing, Restful Resources, and the UrlHelper, and still don't understand best practices for creating complex/nested routes. The example I'm working on now is for events, which has_many rsvps. So a user's looking through a list of events, and clicks register, and goes through a registration proces...

uploading large xml to WCF REST service -> 400 Bad request

I am trying to upload large xml files to a REST service... I have tried almost all methods specified on stackoverflow on google but I still cant find out where I am going wrong....I cannot upload a file greater than 64 kb!.. I have specified the maxRequestLength : <httpRuntime maxRequestLength="65536"/> and my binding config is as fo...

How to find out the current resource and controller name from the view in ASP.NET MVC

I'm using the ASP.NET MVC in a RESTful resource manner and I want to be able get the current resource and controller name from the view. I'm attempt to create a HTML page and I want to know the current resource and controller name is it possible to get this? ...

Annotations (@EJB, @Resource, ...) within a RESTful Service

Hi! I'm trying to inject a EJB within my RESTful Service (RESTEasy) via Annotations. public class MyServelet implements MyServeletInterface { ... @EJB MyBean mybean; ... } Unfortunately there is no compilation or AS error, the variable "mybean" is just null and I get a NullPointerException when I try to u...

Telephony RESTful API

I'm looking for a simple telephony API for use with Rails application. The application must be able to make a notification call through the API and receive confirmation code from the dialpad. ...

Framework for Implementing REST web service in Django

I'm looking to implement a RESTful interface for a Django application. It is primarily a data-service application - the interface will be (at this point) read-only. The question is which Django toolsets / frameworks make the most sense for this task. I see Django-rest and Django-piston. There's also the option of rolling my own. ...

Best way of implementing a batch like operation in a RESTful architecture?

Hello, We have a predominantly RESTful architecture for our product. This enables us to nicely implement almost all of the required functionality, except this new requirement thats come in. I need to implement a page which lets the user to large scale DB operations synchronously. They can stop the operation in between, if they realized...

How to use a SOAP API in ASP.NET?

Hi, I've trying to use the API for CapsuleCRM... http://capsulecrm.com/help/page/api_gettingstarted I've been reading some articles on SOAP in asp.net and I just don't get it. Most of them seem to be ablut creating a web service, not using it and none of them seem to explain how to use basic HTTP authentication. I have got as far as ...

Do you have to install the REST starter kit in asp.net to access APIs?

Hi, I'm currently trying to access a REST API for the first time using visual web developer 2008 express edition. Every article I have found says you have to install the WCF REST starter kit which is a .msi file, which would suggest that I have to install it on my machine and presumably our server too. My question is this. Is there a ...

Ajax And REST: Can I send an ajax request to a REST service to recieve response?

Hi everybody here, I want to use mootools and SqueezBox class to handle a request to a RESTful service. I don't want to use any server-side script. I am using AJAX. I send a request to the following url using GET method. http://www.idevcenter.com/api/v1/links/links-upcoming.json but I receive a 404 error. Is it because cross-site scripti...

Attach XML object to REST POST in asp.net REST starter kit.

Hi, I'm using the REST starter kit in asp.net for the first time and having a bit of trouble. I've created some XML... String newOrganizationStrin = "<somexml></somexml>"; XmlDocument newOrganizationXml = new XmlDocument(); newOrganizationXml.LoadXml(newOrganizationString); Then I create an httpClient... HttpClient http = new HttpC...

What URL scheme would be better for "nested" resources in a RESTful application?

Let's say we want a RESTful web service to manage some logically nested resources, where each instance of resource 'B' is logically contained by an instance of resource 'A'. The first example that comes to mind, working as a sysadmin, is email accounts and their domains: [email protected] [email protected] [email protected] ... What URL s...