Nick Ver Voort | 8 Feb 19:11 2016
Picon
Gravatar

Restlet with logback-access?

Hi, I'm trying to integrate logback-access into my webapp, which is Reslet with an embedded Jetty server. I already have logback-classic working, via the restlet slf4j bridge, but access seems to be a whole other beast. Has anybody done this before? Thanks!

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
ttemplier | 8 Feb 15:26 2016
Gravatar

Server, Client, Object conversion questions from StackOverflow

One great feature of the Restlet framework is its ability to plug external tools into your applications. This can be done at different levels to quote a few:
  • Server: the element responsible to handle HTTP requests within server applications
  • Client: the tool to use to execute HTTP requests from clients
  • Object conversion: the tool to use to convert request payload into object and response object into response text 
Registrations for each type are transparent for the application code. You simply need to put JAR files of Restlet extensions that contain such elements. For example, to use a Jetty server simply add the org.restlet.ext.jetty.jar into your classpath. The same can be done to use Jackson for conversion.

Some questions on StackOverflow are related to this issue because by default Restlet uses an internal HTTP server that should be used for development only and is not suitable for production. A best practice consists of configuring tools like Jetty for both internal server and client to execute HTTP requests.

Some of the related questions are listed below:


Feel free to discuss these issues.
Thierry

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
Thierry Boileau | 27 Jan 08:54 2016
Gravatar

Restlet Framework version 2.3.6 released

Hello,

The version 2.3.6 of the Restlet Framework has been released yesterday.
You can get Maven artifacts from the public Maven repository http://maven.restlet.org, download a zip containing jar, javadocs and sources from https://restlet.com/downloads/current/ or use the Eclipse update site http://p2.restlet.org.


Here is a list of the bug fixes and updates. This list includes also the fixes/updates of the 2.3.5 version:
 - 2.3.6 (01/26/2016)
    - Bugs fixed
       - Fixed current application thread constant when issuing internal calls. Issue #1183.
       - Fixed StringIndexOutOfBoundsException in HeaderReader when reading header with empty value. Issue #1167.
       - Fixed StatusService.toStatus(Status, Request, Response) is not called. Issue #1156.
       - Fixed issue with case sensitivity of query parameters with JAX-RS. Issue #1163.
       - Fixed method value caching broken. Issue #1130.
       - Prevented NPE if using Redirector.MODE_SERVER_INBOUND. Issue #1182.
    - Enhancements
       - Upgraded Jetty connector to version 9.2.14. Issue #1180.

- 2.3.5 (10/03/2015)
    - Bugs fixed
       - Added check for jar class path resources if the inputstream is empty.
         Reported and contributed by Gernot Pansy.
       - Fixed Jetty server connector that sends the Date header twice. Issue #1141.
       - Fixed ResourceException constructor calling incorrect Status constructor. Issue #1139.
         Reported by Chad Gatesman.
       - Fixed support of encoding inside the DecodeRepresentation, and the Jetty client connector.
         Issue #1146.
       - Fixed handling of header Access-Control-Expose-Headers. Issue #1147.
         Reported and contributed by Ralph van Etten.
       - Fixed issue when setting header Access-Control-Expose-Headers. Issue #1145.
         Reported by Ralph van Etten.
       - Removed useless log trace for HTTP_OAUTH_BEARER request with raw value. Issue #1152.
       - Cors filter does not take into account PATCH method. Issue #1178.
    - Enhancements
       - Added Request and response attributes to the ResourceException class.
       - ServerResource traces Exception in the doCatch method with SEVERE log
         level, in case of 5xx errors.
       - Added Guice extension to GAE edition. Issue #1136.
       - Upgraded Jetty connector to version 9.2.14. Issue #1180.
    - API changes
       - Added ResourceException#resource attribute and ResourceException#getRequest()
         and ResourceException#getResponse() shortcut methods.


Best regards,
Thierry Boileau

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
Ashutosh Adhikari | 12 Jan 17:33 2016
Picon

Contribution towards Restlet

Hello ,
I am Ashutosh Adhikari and am in 2nd year of BTech. ICT in Dhirubhai Ambani Institute Of Information And Communication Technology .
I would like to contribute in Restlet.
It would be really helpful if you provide me with some fundamental details about the same.
Thank You

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
xybrek | 3 Dec 09:03 2015
Picon
Gravatar

Dynamic routing

Here's a typical Restlet application:

public class GenericBackendApplication extends SwaggerApplication {
     private static final String ROOT_URI = "/";
     public SampleApplication() {
     }
     public Restlet createInboundRoot() {
         Guice.createInjector(new Module[]{new 
GuiceConfigModule(this.getContext()),
		new SelfInjectingServerResourceModule()});
         Router router = new Router(this.getContext());
         router.attach("/", GaeRootServerResource.class);
         router.attach("/ping", GaePingServerResource.class);
         return router;
     }
}

I wonder if its possible to "attach" ServerResources dynamically or at 
least through some third-party library. My concern is that we are 
building a "generic" backend jar which we want that users of the backend 
to extend the same GenericBackendApplication adding resource without 
editing or re-building it. Merely by using the backend jar as dependency 
and adding Resources and injecting them dynamically to the Router. Is 
this possible?

--

-- 
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.

Laurent Rustuel | 4 Nov 11:26 2015

how to get case sensitive query parameters ?

Hello,
I'm using Restlet 2.3.4 with a JAX-RS application.
I looking to retrieve query parameters, and thus in my resource I use the following :

public Response get( <at> Context UriInfo info ) {

final MultivaluedMap<String, String> queryParameters = info.getQueryParameters(true);
[...]
}
but I the result is case insensitive parameters. I see that in CallContext.java, the method getQueryParameters(boolean decode) use
UnmodifiableMultivaluedMap.getFromSeries(queryForm, false)
where false is used to set case insensitivity. So this seems a dead end, without changing code. Is there another way to get query parameters as case sensitive ?

Regards,
Laurent.

To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.

Guillaume Laforge | 27 Oct 23:15 2015
Gravatar

Promo code for the Restlet in Action book

Hi all,

Just for your information, Manning created a special promo code for their books for JavaOne (the conference is taking place this week in San Francisco)

So if you use the promo code 'ctwjavaone', you can get 39% off of Restlet in Action!


Guillaume

--
Guillaume Laforge
Product Ninja & Advocate

To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
Francis L. | 26 Oct 19:02 2015
Picon

Restlet server on Android: ResourceException: Unprocessable Entity (422)

Hi !

I am having a hard time creating a simple Java Restlet server on Android.
I just want to answer a simple GET and return a class containing a float value.

I know I am almost there, the PLAIN_TEXT client-server interaction works, but I would like to pass a java class to skip any parsing for future, more complex classes.
There is something I don't understand in regards to the way I pass a Serializable class through Restlet.

Here is my StackOverflow post:
http://stackoverflow.com/questions/33311268/

Thanks a lot !
Francis

To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
Francis Leblanc | 24 Oct 00:33 2015
Picon

Getting ResourceException: Unprocessable Entity (422) when accessing a ClientResource

Hi !

I implemented a simple Android Restlet server demo that can provide the sensor values to a Restlet client.
However, when the restlet client receives the object, I get the following Exception from the client:

org.restlet.resource.ResourceException: Unprocessable Entity (422) - The server understands the
content type of the request entity and the syntax of the request entity is correct but was unable to process
the contained instructions

I am having a really hard time making this restlet framework working :(

Please see the following StackOverflow post for all the code information.
http://stackoverflow.com/questions/33311268

Thanks in advance !!

Francis

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3143693

ralph | 12 Oct 17:27 2015

Alternative for httpclient which support PATCH or use a tunnel service on the client

Hi,

I have a restlet client which uses the PATCH method and I am using the ClientResource.wrap() to get a proxy for the resource.

When using the default HTTP client it will complain about HttpUrlConnection not supporting PATCH. 
I can use the org.restlet.ext.httpclient extension which does support PATCH but this is deprecated.

So my questions are:

1. is there an alternative for org.restlet.ext.httpclient which supports PATCH
2. can I make use of the TunnelService on the client so PATCH methods are send as POSTs with an extra query argument containing the actual method.


Thanks,

Ralph.

To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.
Arjohn Kampman | 8 Oct 14:15 2015

CookieAuthenticator doesn't handle Unicode names and passwords correctly

Hi all,

We just ran into an issue with CookieAuthenticator not supporting 
various Unicode names and passwords. We have debugged the issue to the 
encrypt() and decrypt() methods in CryptoUtils. These methods converts 
byte[] to String and back again using the platform's default character 
encoding. If that default encoding is ISO-8859-1, for example, decoding 
a cyrillic or Chinese character will result in '?' characters in the 
resulting byte array.

A simple solution is to always use UTF-8 for the conversion:
1) replace calls to String.getBytes() with 
String.getBytes(StandardCharsets.UTF_8)
2) replace calls to constructor String(byte[]) with String(byte[], 
StandardCharsets.UTF_8)

Regards,

Arjohn Kampman

To unsubscribe from this group and stop receiving emails from it, send an email to framework-discuss+unsubscribe <at> restlet.org.


Gmane