rest

Android JSon Object Not readable in dotnet webservice for insert operation in REST

hi, Json object is returned to a webservice which gets the i/p as [OperationContract(Name = "Create")] [WebInvoke(UriTemplate = "/Create/Data", Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat=WebMessageFormat.Json)] bool CreateCustomer(StringBuilder objCustomer); //in my service file im d...

zend framework rest controller question

Hi guys, I have a rest controller example im trying to run that is giving me a headache. My url im trying to access is localhost/books/edit/1 For some weird reason this route seems to call the getAction with the Controller instead of the editAction. And it throws errors saying that the object doesnt exist. The controller is, class B...

RESTful Dictionary Service?

Hi all, this is only loosely programming related. I wrote myself a shellscript, that extracts all acronyms from a text and writes them to a file. Now I would like to process that file to add the definitions. My first google hit suggested using curl and the dict:// url scheme. However I am behind a proxy, which does not seem to allow th...

Posting xml to a rest api in rails

Hi I need to post some xml info to a restful api can anyone give me a clue of how to do this? I'm using rails. Thanks in advance ...

Restful communication between local applications is a good idea?

I wonder if it's a good idea letting local applications (in the same server) communicate with each other entirely through Restful API? I know this is not an uncommon thing, cause we already have applications like CouchDB that is using HTTP REST for communication, even with local applications. But I want to take it to a higher level by ...

RESTful Rails Put/Post fail problem

So using Rails' REST resources routing, we end up with auto-generated routes that coordinate with Controller actions (I'll refrain from ranting about how I've replicated models twice, as well as relationships twice (as models and then as (often) nested resources; as well as actions twice (as I limit my resources with onlys/excepts where ...

URI for RESTful Web Services

I'm trying to understand how URIs are supposed to look like. Looking at this reference: http://en.wikipedia.org/wiki/Representational_State_Transfer#RESTful_web_services, I am a bit confused by how POST is supposed to work. The example given is this: http://example.com/resources/142. I'm associating "142" as a specific item in "resource...

URI for RESTful Web Services - Part 2

I'm trying to understand how to construct URIs for RESTful web services. Assume I had a dating site, would the following be correct: domain.com/profiles/ <-- list of profiles domain.com/profiles/123/ <-- profile number 123 domain.com/profiles/123/likes/ <-- list of profile 123's likes domain.com/profiles/123/likes/2/ <-- 2nd item in th...

zend framework question

Hi stackworld, Well heres my question. In my project im using a rest service to authenticate clients. That part is ok as I have used a simple authentication by hashing a user id and a password together. After the authentication I want to open to the users few other rest services through the modular scheme in zend framework. I am curre...

How do I create an entity through a RESTful PUT with NHibernate?

According to REST philosophy, a PUT operation should create an entity if it doesn't exist, or update it if it does. So for example, if a client does this operation: PUT http://server/user/5?firstname=John&amp;lastname=Doe I should expect that a user with an ID of 5 either be created or updated. The update case is easy with NHibernate...

REST - web service response - mime type?

1) Is it important to set the correct mime type for a web service response? 2) what is the correct mime type for a, a) XML response? b) JSON response? application/xml text/xml application/json application/x-javascript text/javascript text/x-javascript text/x-json ...

Using HTTP PUT to send JSON with Jquery and Rails 3

HTTP PUT isn't entirely cross browser so Rails (I'm using Rails 3) supports using POST and passing the _method query param. This is great, but it doesn't seem to work when sending JSON. Example: $.ajax({ url: window.location.pathname, type: 'POST', contentType: 'application/json', data: JSON.stringify({_method:'PUT', p...

Asynchronous use of webclient to transfer files

I have an objective to transfer some files which can be pdf, jpg and xml from one location to another. I am creating a handler based API for that. What could be the best approach for doing it? Should i return a byte array so that the client can pick the byte array and convert it back to file? Also the max file size I need to handle is 18...

REST calls over XMPP

Hi, I want to make a solution where I can use XMPP chat clients connected to gtalk, resolving web services/REST calls meant for a LAN (behind firewall proxy etc) and transferring over to the other chat client on another different LAN (behind other firewall proxy etc). I have narrowed down on Smack API, but being a newbie in XMPP and sm...

How to combine RESTful calls and Apache wink?

Hi, everyone, I have a question about the REST and Apache wink. I want to use the Apache Wink to handle the transition between front end and back end. However, I don't have any ideas on how to start and learn it. Can anyone help me? thank you. ...

Going strictly RESTful on Rails

I'm working on a gaming app (mobile front ends, Rails backend) and trying to decide if I should go strictly RESTful. It appears that I'll be creating a lot more controllers if I do so. For example, there are several game actions I need to implement like attack, defend, etc. If I go strictly RESTful, I'll need to create a controller for e...

Architecture: MVC based web-apps around a REST interface

I'm not sure how to phrase my question.... From different sources I pick up the idea that it makes sense to build web applications around a REST interface. A REST service could execute some controller logic (validations, database-access, etc) and then return a (static) *.xhtml resource. Combined with a decent javascript framework, thi...

Error building/compiling open-source J2ME 'ajax' request (wrapper) library for making ReSTful api calls

I downloaded an opensource project from https://meapplicationdevelopers.dev.java.net/source/browse/meapplicationdevelopers/demobox/mobileajax/lib/request/ When i try a Clean and Build from Netbeans, it results in this error message: Problem: failed to create task or type nb-prep Cause: The name is undefined. Action: Check the spelling. ...

Are there text editors that can be used to create markup languages (like markdown, rest and such?)

I'm becoming more interested in markdown and rest for documentation/requisites in projects, but some people in the team aren't that techie to use and remember these markups. It's going to be a bad move to just adopt them when they're used to OpenOffice files. There is a visual editor for Latex, named Lyx, that is WYSIWYM and WYSIWYG, bu...

RestSharp v. WebClient?

I'm building a Windows Phone 7 Silverlight app. Is there any reason to use RestSharp instead of WebClient? I've looked around on the RestSharp site, but it's not immediately obvious what the benefits are. ...