rest

insert text-resource into jsf page

hi, there's a RESTful service which is Producing text/plain and I want to add that content into my JSF page. Is that possible? Is there a tag for that? ...

JQuery WCF .net 4 Rest 405 Method Not Allowed Trivial

I keep getting a 405 Method not allowed. The script is hosted on same port as server, using IIS. <script> function auth() { var str= '{"Password":"Password","Username":"Username"}'; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "http://127.0.0.1:8080/auth/authenticate", data: s...

Custom WebFaultException on WCF Rest Serialization Failure?

With an object like this: [DataContract] public class SampleItem { private int _id; [DataMember(IsRequired = true)] public int Id { get { return _id; } set { _id = value; } } private string _stringValue; [DataMember()] pu...

RESTful Strings matcher in Java

I'm looking for a Java library that evaluates REST-style URLs. Something like: public Result evaluate(String url, String pattern); The pattern would be something like: /users/{userId}/photos/{photoId}.html The result must include: indication if the url matches pattern the actual values of the url variables {userId} and {photoId} ...

Who Needs (SOAP) Reliable Messaging?

I spotted a very good argument against protocol-based (viz. SOAP) reliable messaging. Is this a flame-war topic, or is there a fair degree of consensus about this? I think the author's "Netherlands" case-study ought to have included an in-order example as well. p.s. I wish google had a "contrast" tool, that finds sites with opposing p...

REST in lift 2.0 + Scala 2.8

I can see from release notes and such that there has been many improvements in lift 2.0 for building REST stuff, but I'm unable to find what has been done or how to use the new stuff compared to the old. Does anyone know of such documentation, blog entries, examples or similar for how to use REST in lift 2.0. Ideally I would like som...

Passing pdf data through REST

How to pass the whole pdf content as response in Restful web services using java platform. I tried with converting the responses to String and byte array. First case, got registered expression error. In Second case, getting unexpected results. ...

what is the best strategy for a log analyze applications

i will develop a web application to view and analyze log files from both remote machines and locally and planning to use java. At first glance it seems like application must work with big data sets effectively. For example to list a log file on browser i should implement a paginated list working with ajax (server will give data according...

Call REST API from PowerShell Script

How can I call a rest based API from a PowerShell script and process the Json answer? ...

Creating REST Web Services with Python

Hi guys, Is it possible to create REST Web Services, that returns JSON or XML, using Python ? Could you give me some recomandations ? Thank you. ...

Calling a REST service with Python

I have a REST service that I'm trying to call. It requires something similar to the following syntax: http://someServerName:8080/projectName/service/serviceName/ param1Name/param1/param2Name/param2 I have to connect to it using POST. I've tried reading up on it online (here and here, for example)... but this is my problem: If I...

Simplest REST-service for real time chart drawing program demo

Real time Chart drawing program can work with different datasources, REST-service is one of them. I need any free REST service for a demo. For example, chart program sends request to http://google.com/woof/woof every second and gets current NASDAQ, or smth else fast changeable (for pretty plotting). This service have to return just nu...

Android REST XML result to Listview

I have a REST web service that returns an xml result like this: - <MyCategories xmlns="http://schemas.datacontract.org/2004/07/ceva" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt; - <Category> <CategoryName>First category</CategoryName> <Id>1</Id> </Category> - <Category> <CategoryName>Second category</CategoryName> ...

Problem consuming RESTful WCF web service with php curl

I am having problems consuming a WCF web service (PaySimple's v3.00 API) using php curl. I am trying to post an xml payload to the service and I keep getting a 400 - Bad Request error. When I using Firefox's Poster add-on, I can post the very same payload and I get the expected response - 200 OK with an XML response containing the requir...

Zend framework REST response apache issue

This question extends problem which was mentioned here: http://stackoverflow.com/questions/2577965/zend-framework-rest-service-http-status-code-problem I am creating REST service and I am using both XML and JSON formats. In case of error I am returning proper HTTP code with content that describes error. When I set HTTP code Apache send...

Warden vs Rack::Auth::Basic. Doing HTTP-Basic-Auth in Ruby-Framework.

Hi... I want to create a WebService in Ruby (Sinatra, Padrino, maybe Ramaze... don't know yet...), but I definitely want to secure it... It will be the backeend for an Iphone-App, so I think SSL-Secured HTTP-Basic-Auth will be fine. I've been looking around at several authentication Frameworks and came across warden... Seems to be pret...

WCF 4 Rest Getting IP of Request?

Hey, how do you get the IP address of the person making a request in something like the following: [ServiceContract] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)] [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)] public partial c...

How to better transfer objects between Jersey restful enabled classes to JSP pages

I have this : public class Base { @GET @Path("/news/{page_number}") public Viewable news(@PathParam("page_number") int pageNumber) { NewsParams news_params = new NewsParams(); news_params.setPageNumber(pageNumber); return new Viewable("/news.jsp", news_params); } } and the news.jsp is : ...

REST with ruby?

Are there good references teaching you how to send PUT/DELETE/POST/GET with ruby? I have looked at Net::HTTP. Is this library capable of all four methods? I couldn't find how to send with PUT. Are there other good libraries for all these four methods? ...

PHP website with RESTful API using Django. Possible? Good Idea?

I have an existing website written in PHP. I would like to add a REST API. I like how easy creating a RESTful API was using Django. Are there any CONS for using Django for the sole purpose of creating an API on a PHP powered website? Thanks in advance. ...