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
0
votes
1 answer

Restlet Chunked encoding buffer size

We are using Restlet over Jetty, for some reason our default buffer size seems to be 262,144 bytes. We would like to set a custom value, but have been unable to figure out how.
J Pullar
  • 1,915
  • 2
  • 18
  • 30
0
votes
1 answer

POST with Restlet framework for Java

I can make a GET with no problem at all. When trying it with a POST request, I get this message: Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request I'm testing it with Simple REST…
Alvaro
  • 40,778
  • 30
  • 164
  • 336
0
votes
1 answer

Restlet does not differentiate between different Accept Headers

In my ServerResource are two different "Get-Functions" public class ApiKeyRestlet extends ServerResource { @Get("json:json") public ApiKeyResponse apikeyAsJson() throws RecordDoesNotExist { ... } @Get("text:text") public Representation…
Mike Mitterer
  • 6,810
  • 4
  • 41
  • 62
0
votes
1 answer

Restlet sending client certificate

I'm using restlet to create an HTTPS channel with both server and client certification. I have no problem to certificate the server ( ie having the server exposing a certificate and trusting it from the client ) but I have no idea on how to send the…
Felice Pollano
  • 32,832
  • 9
  • 75
  • 115
0
votes
1 answer

Restlet not launching in Linux

When I launch Restlet J2SE on linux, I am getting the following exception. Any hint ? java.lang.ArrayIndexOutOfBoundsException: 10 at java.util.concurrent.CopyOnWriteArrayList.addAllImpl(ILjava/util/Coll …
jfk
  • 4,335
  • 34
  • 27
0
votes
1 answer

How to route all path to a single ServerResource with Restlet

This code is a very basic Restlet app: public class FirstStepsApplication extends Application { private static final String ROOT_URI = "/"; @Override public Restlet createInboundRoot() { Router router = new Router(getContext()); …
quarks
  • 33,478
  • 73
  • 290
  • 513
0
votes
1 answer

@JeromeLouvel better understanding of Restlet

Is there a place or a way to better get a full understanding of how to leverage the Restlet API? Specifically.... What is the difference between stating a Server such as: new Server(Protocol.HTTP, 8800, SimplerTest.class).start(); And this…
Neutron_boy
  • 919
  • 1
  • 6
  • 7
0
votes
1 answer

Restlet and consuming/storing files

How would one handle consuming an attachment from a client POST/PUT request on the server side and store that file in a local folder, all using Restlet ? My thoughts are as follows: Setup Server as follows: new MailServerComponenet.start(); public…
Neutron_boy
  • 919
  • 1
  • 6
  • 7
0
votes
1 answer

Resource Discovery in Restlet

I am using spring and restlet in a project. I am trying to implement automatic resource discovery. If user issues a get request like this, response should have links to the child resources as shown below. Request : GET…
0
votes
1 answer

when geting objects from a Json with restlet how can I get different objects in case the Json chnges its structure

I have a Json with some hierarchy, that at some point can change in its structure. The key OnOff can either have an object or an array, it can have an array like this: "OnOff": [ { "state": { …
juan Isaza
  • 3,646
  • 3
  • 31
  • 37
0
votes
1 answer

How to compile/build restlet 2.2 modules?

I have cloned the restlet codebase from github and I am working on 2.2 branch. However I am not able to build the modules as it doesn't have pom.xml in any of the module. I have previously worked with restlet 2.1 branch wherein I was able to…
Onkar
  • 45
  • 4
0
votes
1 answer

Restlet - Server class handling multiple kinds of resources

I cannot understand how to use org.restlet.Server class for handling different kinds of ServerResource's. I want run: new Server(Protocol.HTTP, 8182, SomeNotYetReady.class).start(); and I want to get a different Resource according to the URL…
user1922691
  • 119
  • 1
  • 2
  • 6
0
votes
1 answer

Could not find a getter for password in class

I am writing REST services using Java RESTLET . I have my User class here : @Entity @Table(name = "user") public class User implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy =…
burning
  • 2,426
  • 6
  • 25
  • 38
0
votes
1 answer

Restlet Rest server on android

I want to host a simple rest server on an android phone to get remote access to some data. I followed the descriptions on the restlet website but I cant even get a simple example running. I downloaded the android restlet package and added the…
TosKen
  • 481
  • 5
  • 20
0
votes
2 answers

Read out custom Header from a Restlet Request

I need to read out a custom header from a Restlet Request. According to this I tried Form headers = (Form) request.getAttributes().get("org.restlet.http.headers"); String ltpaToken = headers.getFirstValue("LtpaToken2"); But this results in the…
Ben
  • 1,579
  • 4
  • 20
  • 34