Questions tagged [restlet-2.0]

Restlet is a lightweight, comprehensive, open source REST framework for the Java platform. Restlet is suitable for both server and client Web applications.

Restlet is a lightweight, comprehensive, open source REST framework for the Java platform. Restlet is suitable for both server and client Web applications. It supports major Internet transport, data format, and service description standards like HTTP and HTTPS, SMTP, XML, JSON, Atom, and WADL. A GWT port of the client-side library is also available.

227 questions
37
votes
9 answers

JaxbRepresentation gives error "doesnt contain ObjectFactory.class or jaxb.index"

I am trying to create a sample test application which converts an object to JaxbRepresentation. But when I try to run this, it gives me an error. Main.java file package test_jaxb; import org.restlet.Server; import org.restlet.data.Protocol; public…
user619237
  • 1,776
  • 3
  • 17
  • 19
11
votes
1 answer

Restlet streaming data

I have this task that I'm undertaking where I would be reading data from a device and make it available over a web service. The data is read 4 times a second. I want the web clients to be have an open HTTP connection and get the device readings as a…
Professor Chaos
  • 8,850
  • 8
  • 38
  • 54
7
votes
4 answers

Running a RESTlet Tutorial, I'm receiving java.lang.NoClassDefFoundError

I'm trying to run the first server tutorial on RESTlet docs but i'm getting errors even though i added the jars to my classpath. I added org.restlet.jar and org.restlet.ext.* The code for the server is : package test; import…
Mido
  • 504
  • 2
  • 6
  • 18
6
votes
2 answers

UTF-8 Strings getting scrambled by Restlet on GAE

I have a simple Restlet service hosted on AppEngine. This performs basic CRUD operations with strings and is working well with all sorts of UTF-8 characters when I test it with curl (for all the verbs). This is consumed by a simple restlet client…
JohnIdol
  • 48,899
  • 61
  • 158
  • 242
6
votes
2 answers

Issue passing context attributes to ServerResource

My application attempts to set context attributes: final Router router = new Router(); router.attachDefault(HttpListener.class); org.restlet.Application myApp = new org.restlet.Application() { @Override public…
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
5
votes
3 answers

How to create journal entry in netsuite api?

I am trying to create a journal entry on NetSuite using its SuiteScript API. Here is my code. export function post() { var rec = record.create({ type: record.Type.JOURNAL_ENTRY, isDynamic: true, }); rec.setValue({ fieldId: "memo", …
Krishna Karki
  • 749
  • 12
  • 31
5
votes
1 answer

Using Freemarker with Restlet 2.0 in a Java EE server

I'm a bit confused with what is written in the documentation(s) for Freemarker and Restlet's freemarker extension. Here's the situation: The restlet engine serves an HTML representation of a resource (e.g. www.mysite.com/{user}/updates). The…
PhD
  • 11,202
  • 14
  • 64
  • 112
5
votes
1 answer

Is Restlet returning 415 Unsupported Media Type when it should return 400 Bad Request?

I'm using Restlet 2.1 with jackson to build a json REST api. When I make a request with the expected content type but a malformed body, I get back a 415 "Unsuppored Media Type" status code. I think the correct error code should be 400 "Bad…
Matteo Caprari
  • 2,869
  • 4
  • 27
  • 35
5
votes
1 answer

Maximum threads issue

To begin with, I checked the discussions regarding this issue and couldn't find an answer to my problem and that's why I'm opening this question. I've set up a web service using restlet 2.0.15.The implementation is only for the server. The…
4
votes
2 answers

Context of RESTlet Application is null using internal RESTlet Server

I have a Restlet (2.0.10) application, I start with the following code: public static void main(final String[] args) { try { // Create a new Component final Component component = new Component(); // Add a new HTTP server…
ali
  • 1,475
  • 4
  • 22
  • 40
4
votes
1 answer

Length Required (411) - Length Required in a RESTlet client

Im new to REST and am developing a client to post data to a external hosted service. Im using org.reslet.resource.ClientResource to create a client Representation rep = new JsonRepresentation(json); …
Joey Cardoso
  • 43
  • 1
  • 3
4
votes
1 answer

RESTlet tutorial application does not return Java Objects (JSON only)

I've been looking the source code available from the Restlet official tutorial. I am trying to hit the Restlet server using the Android app from he tutorial adn I only get the JSON response, not the Java Object. I tried using all libraries and…
oviroa
  • 1,079
  • 2
  • 12
  • 29
4
votes
1 answer

How to call asynchronous HTTP client in Restlet with timeout

I have looked everywhere for this and I can't find the answer. I even saw a copy of the Restlet book, which gives only a partial answer and even that partial answer is wrong. What I am trying to do is very simple. I need to do a simple GET request…
Marc
  • 3,386
  • 8
  • 44
  • 68
4
votes
1 answer

Need example of putting filter in Restlet Component

I have a Restlet (v2.1.1) component that is using a ServerResource to process HTTP GET requests. I would like to put filters and/or routers into the component so that they can do some processing before the request gets to the ServerResource. I have…
Factor Three
  • 2,094
  • 5
  • 35
  • 51
4
votes
1 answer

which restlet HTTPS client to use on android?

I'm new to restlet, and trying to understand which HTTPS client option I should be using with android. Which HTTPS client option is most robust and stable for Android? I'm using restlet 2.1rc4 (and 2.1.0), and android 2.2. Unfortunately, changing…
1
2 3
15 16