Questions tagged [restlet]

Restlet Framework is an open source framework for Java (and JavaScript) to expose and consume RESTful web APIs. It has editions for Java SE, Java EE, OSGi, GAE, GWT and Android.

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, HTTPS
  • SMTP, SMTPS
  • POP3, POP3S
  • FTP, SDC
  • FILE, RIAP, WAR pseudo protocols
  • XML, JSON, Atom, OData and WADL media types
  • etc.

For additional details:

1254 questions
4
votes
2 answers

Need RESTLET + JAX-RS + JSON Good example

I'm experimenting the Restlet framework with AppEngine and I try to retrieve a list of Object (ArrayList for instance) to a JSON representation with JAX-rs Resource For instance a sample User class: public class User { private String…
Guillaume Maka
  • 149
  • 3
  • 15
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
3 answers

How do I implement client side http caching like a browser?

I use a RESTFul service as a backend to my frontend. The service sets expires/etag/lastmodified headers on it's responses. What I'm looking for is a client-side(favorably java) library which can fetch data from the service and cache it in a…
Sam
  • 99
  • 1
  • 2
  • 7
4
votes
1 answer

Netsuite - REST API (restlet)- creating record causes INVALID_LOGIN_ATTEMPT failure on the 2nd and more request for records

I have problems creating subsequent records with netsuite rest api using Token Based Authentication (TBA) oauth authentication. Here is my full code: https://gist.github.com/axilaris/428e63e5ff107d212fbcc07c5bdbce7a (it contains restlet, python code…
Axil
  • 3,606
  • 10
  • 62
  • 136
4
votes
0 answers

Restlet with GWT to call REST service with HTTP DIGEST

i m using GWT 2.2 and restlet-gwt-2.1m4. i m trying to call a rest service that uses HTTP Digest. So i used the tutorial on Restlet wiki : http://wiki.restlet.org/docs_2.1/13-restlet/27-restlet/46-restlet/112-restlet.html First thing is this does…
guigui42
  • 2,441
  • 8
  • 35
  • 48
4
votes
2 answers

Exposure of Camel routes as REST services under Web container

I have Camel route that I would like to expose as a REST Web Service. Application is deployed on Web container (Jetty/Tomcat) and Spring is used as well for DI and other "infrastructural" things. I took a look at both camel-restlet and camel-cxfrs…
oiavorskyi
  • 2,893
  • 1
  • 20
  • 23
4
votes
2 answers

Error with HTTP Connection: close header

I am having a weird problem with a small restlet service that I am building as an exercise. The application is supposed to respond with some XML (specifically TwiML, as it is meant for Twilio) on an HTTP POST, and it worked well for standalone…
haridsv
  • 9,065
  • 4
  • 62
  • 65
4
votes
1 answer

Restlet, GWT and Sessions

What is the best way to have a session between a Restlet Java API and GWT? In my app the user will login with a username and password and if it successfully authenticates the userID is returned. This is then stored in a cookie and used in calls to…
christophmccann
  • 4,181
  • 7
  • 42
  • 66
4
votes
2 answers

Restlet ServerResource method parameters?

This is probably a really stupid/simple question with such an obvious answer that it seems not worth stating in restlet documentation. Where and how (if at all) can Restlet pass parameters to methods in ServerResource classes? Given this…
Finbarr
  • 31,350
  • 13
  • 63
  • 94
4
votes
1 answer

Java accessing ServletContext from within restlet Resource

I am using Tomcat server in java and wanted to be able to access the ServletContext from the restlet Resource in order to access my cached DataSource object (to pool mysql connections). org.restlet.resource.Resource comes with a Context object but…
Mohamed Nuur
  • 5,536
  • 6
  • 39
  • 55
4
votes
1 answer

In Java, how to set the header of a Restlet Response?

I can't seem to figure out how to add headers to my restlet response. When I look at the available methods in the Response object, all I see is setStatus, setEntity, and setAttributes but none of these tell me how to set custom http headers on the…
Mohamed Nuur
  • 5,536
  • 6
  • 39
  • 55
4
votes
1 answer

Restlet Protocol.FILE usage

I have a question about Protocol.FILE usage in this example from the Restlet site // URI of the root directory. public static final String ROOT_URI = "file:///c:/restlet/docs/api/"; [...] // Create a component Component component = new…
Mihail Slavchev
  • 397
  • 1
  • 7
4
votes
3 answers

Website in OSGi that consumes REST web service running in background

I spent quite a few days now trying to figure out how to add a website in OSGi. I hava Restlet web service running with Jetty extension to use Jetty as a connector. This feature provides different resources under multiple URLs. But I would also…
Excite
  • 484
  • 1
  • 5
  • 19
4
votes
1 answer

Calling SOAP service inside REST service

I want to code for a REST service using Restlet framework that wraps a third party SOAP service with some XML data. So whenever I call the REST service with some XML data that REST service internally calls that third party SOAP service with the XML…
Shivam
  • 649
  • 2
  • 8
  • 20
4
votes
0 answers

Https Proxy with Restlet Client

I am trying to get an https page over a proxy in restlet 2.1.7 with HTTPClient 4.1 and it is not authorizing with the proxy. If I connect to a page through http the authorization works. Connecting with httpurlconnect through the proxy to the same…