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
5
votes
3 answers

Apache camel Connection pool timeout with restlet even after configuring component options

I have a camel Java DSL route which invokes a restlet endpoint. And the route works without any issues when I hit the same manually. But, when I try to pump a larger number of requests through code I'm getting "Timeout waiting for connection from…
Vivek Dhayalan
  • 467
  • 4
  • 28
5
votes
2 answers

How do I send an error response in Restlet?

I have a Restlet ServerResource, which should process a GET request with a parameter user. If user is equal to some value, it should return some image, otherwise send an error response (404 or 403) indicating that the sender is not allowed to get…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
5
votes
1 answer

Configuring HttpClient for usage as Restlet client

I'm stuck configuring Restlet for my client-side code. I'm using Restlet 2 and HttpClient 4. I added the extension jar and the HttpClient jars to the build path and it seems to work. However, I don't know how to configure it in detail. I don't…
b_erb
  • 20,932
  • 8
  • 55
  • 64
5
votes
1 answer

How do I set the Content-Type on a camel-restlet producer request?

I need to consume simple Rest service, but their implementation breaks if my request goes out with Content-type: application/x-www-form-urlencoded. I need to set it as "application/json"or be faced with a status 415. I am using the restlet producer…
5
votes
1 answer

Unable to convert a [text/plain,UTF-8] representation into an object of class java.lang.String

I'm facing a strange problem while developing a restlet web service + Android app. When I try to recover a String from the web service (deployed locally on Tomcat 7.0) using a simple get, if the string from the server is too big the Android app…
tigerjack
  • 1,158
  • 3
  • 21
  • 39
5
votes
2 answers

Why use REST @Produces annotation

So I understand that you are specifying the type, but why? Under what conditions would it matter. For example, if I have the following method, and I comment out the @Produces annotation, it still returns JSON.…
MattC
  • 5,874
  • 1
  • 47
  • 40
5
votes
2 answers

Easiest frameworks to implement Java REST web services in 2014

a lot of frameworks on the JVM platform have grown big and in my opinion a bit messy. Some J2EE projects I was involved in had almost as many configuration files as source code files. Sure, one can argue that’s always up to the developer but I tend…
Kamil Nękanowicz
  • 6,254
  • 7
  • 34
  • 51
5
votes
4 answers

Running JUnit Tests on a Restlet Router

Using Restlet I have created a router for my Java application. From using curl, I know that each of the different GET, POST & DELETE requests work for each of the URIs and return the correct JSON response. I'm wanting to set-up JUnit tests for each…
Lee
  • 564
  • 1
  • 10
  • 30
5
votes
1 answer

(1002) - No available client connector supports the required protocol: 'HTTPS'

I'm trying to set up a HTTPS client on Android using Restlet but I get this error: Internal Connector Error (1002) - No available client connector supports the required protocol: 'HTTPS'. Please add the JAR of a matching connector to your…
Victor Basso
  • 5,556
  • 5
  • 42
  • 60
5
votes
1 answer

Restlet with Simple connector dropping requests?

I'm running into a really weird issue where a browser's HTTP requests appear to be discarded by the Simple connector used by a Restlet server. Server setup: Restlet 2.1.2 server Restlet-Simple extension (comes with Simple 4.1.21) Restlet-crypto…
5
votes
1 answer

When to use Restlet router v. Component with multiple routes

I've created multiple routes using this code with components: Component component = new Component(); component.getServers().add(Protocol.HTTP, port); component.getDefaultHost().attach(pair.uriPattern,…
djechlin
  • 59,258
  • 35
  • 162
  • 290
5
votes
3 answers

ProGuard - org.codehaus.jackson.map.JsonMappingException: No suitable constructor found for type

I have an Android-based application which is connecting to the Google App Engine using Rest services, the app works perfectly until it is obfuscated through ProGuard prior to release. The error reported in LogCat when running the obfuscated app…
Iain STIRZAKER
  • 221
  • 3
  • 8
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…
5
votes
2 answers

Restlet server socket timeout

I am having a client doing requests to a server which could take some time to respond. When the server wanted to reply it was throwing the following exception: The connection was broken. It was probably closed by the…
avandecreme
  • 971
  • 1
  • 8
  • 18
4
votes
3 answers

RESTful Webservices on Google App Engine

First of all I need to say that I'm not so experienced in Google App Engine. I know that it is possible that we deploy RESTful Web-services (JERSEY) on GAE And also I know that RESTLET has a version specifically for GAE. I want to take advice from…
ehsun7b
  • 4,796
  • 14
  • 59
  • 98