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
1
vote
1 answer

How to get values from multi select with restlet

I have some html forms which have select inputs that can have multiple values selected. When I post them to my Restlet service I only the currently selected value. I know that if this were a plain servlet I could use request.getParameterValues(...…
sankofamusician
  • 111
  • 1
  • 3
1
vote
2 answers

Restlet is returning HTTP 415 for every POST request I make

I am getting this error every time I try to post data to my server: Server logs: Starting the internal [HTTP/1.1] server on port 9192 Starting facilitymanager.api.rest.FacilityManagerAPIRestWrapper application 2015-06-22 13:18:11 127.0.0.1 - …
PedroD
  • 5,670
  • 12
  • 46
  • 84
1
vote
1 answer

Restlet: Initialization code before application start

How can I run java code before first request arived to server (before the application)? Should I define something in web.xml?
Elad G.
  • 146
  • 7
1
vote
2 answers

Restlet using custom media type

In Restlet 2.3 (SE) I am trying to use media types to control versions. My current attempt involves registering new extensions in my inbound route: @Override public Restlet createInboundRoot() { ... …
tarka
  • 5,289
  • 10
  • 51
  • 75
1
vote
1 answer

Restlet obtaining Application

In Restlet 2.3 what is the recommended way of obtaining an Application? The docs suggest there is a static method Application.getCurrent() that implies that it is possible to obtain the executing Application. However, this requires the call to be…
tarka
  • 5,289
  • 10
  • 51
  • 75
1
vote
2 answers

Restlet 2.3 How to set temp directory

I am using Restlet 2.3 with the Jetty ext. How do you set the temp directory that the jar is unpacked to? Using just jetty in another project it can be achieved using: private void resetTempDirectory(WebAppContext context, String currentDir) { …
tarka
  • 5,289
  • 10
  • 51
  • 75
1
vote
1 answer

Unable to set status reason in http response header in Restlet Web service

I am making a REST web service using restlet framework. I am using the org.restlet 2.3.1 jar I have to customize the error response header. Depending on specific issue i have to show the response status code and status reason in response header. For…
kaka
  • 7,425
  • 4
  • 19
  • 23
1
vote
0 answers

Using Restlet ClientResource Get API with generic type

I want to pass in a generic type to the ClientResource get API. I am calling the following Restlet API and receiving an error. SearchHit result = new ClientResource(URL).get(new TypeReference>(){}.getClass()); Type mismatch: cannot…
user481779
  • 1,071
  • 2
  • 14
  • 28
1
vote
1 answer

Extending Restlet 2.3 ClientInfo

Is it possible to extend org.restlet.data.ClientInfo? I need a convenient way of adding a List permissions to complement the existing List roles. In a perfect world I would be able to add List permissions but the former is…
tarka
  • 5,289
  • 10
  • 51
  • 75
1
vote
1 answer

Does Restlet support reactive programming?

Does anyone know if Restlet supports reactive programming for handling its request? If not, are the available implementations (BIO & NIO)? I understand there is a problem/bug with Restlet 2.2.x . How is Restlet async handled? I will like to know the…
Lekkie
  • 355
  • 5
  • 18
1
vote
1 answer

Restlet Complex Object to XML serializaton

I have restlet web service which returns response as xml. I'm using Jackson as binder. below is class I'm returning. import java.io.Serializable; import java.util.ArrayList; import java.util.List; public class ApiResponse implements…
1
vote
0 answers

Restlet: Why does chaining ClientResource.getChild() yield siblings rather than nested resources?

The following sample attempts to use two different methods to perform path composition for nested resources. The first uses ClientResource.getChild(), while the second creates a new Reference from the original ClientResource's reference, and then…
Ben Schreiber
  • 377
  • 2
  • 13
1
vote
1 answer

issue binding context route using Restlet

I'm using restlet in a proof-of-concept as follows: final Component component = new Component(); component.getServers().add(Protocol.HTTP, 8182); final Router router = new Router(component.getContext().createChildContext()); …
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
1
vote
0 answers

Restlet use of Android intents

I tried to find answer to my question without success, please excuse me if it is a trivial question.... I managed to add Restlet server to an existing Android application. It works well, serving get/put/post request as needed. The problem that on…
1
vote
1 answer

Cookies set in Request by Restlet Client removed at Restlet Servlet end

I have a Test Client which makes Restlet Request as below : public class TestRestlet { public static void main(String[] args) throws IOException { CookieHandler.setDefault(new CookieManager( null, CookiePolicy.ACCEPT_ALL )); ClientResource…
hims
  • 11
  • 5