Re: Receive custom exceptions from Restlet Framework in GWT client

2017-08-08 Thread Jerome Louvel
Hi Roland,

That's great to hear about your success with Sencha GXT & Restlet/GWT!
I hope you can contribute back your fixes regarding exceptions.

Regarding v3, it's both a question of bandwidth for the core team, making
it harder to innovate while we have to maintain the v2 branch and support
several editions at the same time. Also, we want to build it on top of a
Netty IO foundation for better scalability, reative support and protocol
support so it is hard to see this API design work within a GWT edition
without excessive constraints.

But v3 is not going to be ready anytime soon, hopefully next year, and we
are continuing to maintain v2, with an upcoming v2.4 planned in Q3 for
example. So Restlet/GWT should be around and maintained for years to come :)

Best regards,
Jerome


On Tue, Aug 8, 2017 at 11:32 AM, Roland Beuker 
wrote:

> Hello Jerome,
>
> Why are you removing the GWT support from RestLet 3.X? I've developed a
> nice
> working Sencha-GXT/Restlet 'street' with a 'RestletProxy'.
> This works very well ...
> I'm only missing the annotated exceptions at this moment, but I am about to
> fix this.
>
> I would like to keep using GWT/GXT with the latest Restlet versions...
>
> Best regards,
>
> Roland
>
>
>
> --
> View this message in context: http://restlet-discuss.
> 1400322.n2.nabble.com/Receive-custom-exceptions-from-
> Restlet-Framework-in-GWT-client-tp7579493p7579495.html
> Sent from the Restlet Discuss mailing list archive at Nabble.com.
>
> --
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447;
> dsMessageId=3282777
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447=3282780

Re: Receive custom exceptions from Restlet Framework in GWT client

2017-08-08 Thread Jerome Louvel
Hi Roland,

The support for annotated exception in Restlet/GWT hasn't been developed,
but it should be technically feasible.
Do you think you could contribute it? Happy to support you during this
process.

I would also like to highlight that in our future v3, we don't intend to
keep support for the GWT edition of RF, but we are happy to maintain the
existing v2 branch as long as possible and necessary.

Best regards,
Jerome


On Sat, Aug 5, 2017 at 10:42 PM, Roland Beuker 
wrote:

> Restlet 2.3 introduced annotated exceptions, but this user-defined
> exception
> isn't delivered to GWT clients. The GWT client only receives the status
> code.
> This is because of the ClientProxyGenerator implementation;
>
> public void postLocation(LocationDto param1, final LocationDto> callback)
> {
> ...
>
> public void handle(Request request, Response response)
> {
>if (getClientResource().getStatus().isError())
>{
>   callback.onFailure(new
> ResourceException(getClientResource().getStatus()));
>}
>else
>{
>
> ...
>
> }
>
> In this post Thierry Templier describes it is possible to use annotated
> exceptions towards clients;
>
> http://restlet.com/company/blog/2015/12/21/exception-
> handling-with-restlet-framework/
>
> Is it possible to use this technique in the GWT implementations (enabling
> user-defined exception with Restlet and GWT)?
>
> See also my post on this subject at stackoverflow;
>
> https://stackoverflow.com/questions/45505340/receive-
> custom-exceptions-from-restlet-framework-in-gwt-client
>
> Regards,
>
> Roland Beuker
>
>
>
>
>
> --
> View this message in context: http://restlet-discuss.
> 1400322.n2.nabble.com/Receive-custom-exceptions-from-
> Restlet-Framework-in-GWT-client-tp7579493.html
> Sent from the Restlet Discuss mailing list archive at Nabble.com.
>
> --
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447;
> dsMessageId=3281366
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447=3282758

Re: getServers().add(....) always bind to 0.0.0.0

2016-09-13 Thread Jerome Louvel
Thanks Jon for the update.
A PR would be nice.

Jerome

On Tue, Sep 13, 2016 at 1:25 PM, Jon Finanger  wrote:

> I've checked the Jetty connector, and its fine.
> I'll make that pull request for the internal connector when i have som
> spare
> time here...
>
>
>
> --
> View this message in context: http://restlet-discuss.
> 1400322.n2.nabble.com/getServers-add-always-bind-to-
> 0-0-0-0-tp7579464p7579468.html
> Sent from the Restlet Discuss mailing list archive at Nabble.com.
>
> --
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447;
> dsMessageId=3185647
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447=3185650

Re: getServers().add(....) always bind to 0.0.0.0

2016-09-11 Thread Jerome Louvel
Hi Jon,

The VirtualHost is indeed only used for routing to match incoming HTTP
calls.
Which HTTP connector are you using?
If you think this is a bug, could you submit a pull request?

Thanks,
Jerome


On Sun, Sep 11, 2016 at 2:35 PM, Jon Finanger  wrote:

> I checked the source code for the HttpServerHelper.java where the http
> server
> is created. Its only setting for the InetSocketAddress is the port and not
> the bind address. I hardcoded my ipaddress just to test and updated
> restlet.jar and the server was bound correctly to the correct Ip address as
> Server.java promises.
> I guess the same goes for httpsserverhelper.
>
>
>
>
>
> --
> View this message in context: http://restlet-discuss.
> 1400322.n2.nabble.com/getServers-add-always-bind-to-
> 0-0-0-0-tp7579464p7579465.html
> Sent from the Restlet Discuss mailing list archive at Nabble.com.
>
> --
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447;
> dsMessageId=3185492
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447=3185493

Restlet Framework 2.3.3 released

2015-06-22 Thread Jerome Louvel
Hi all,

We have just released a maintenance version on the stable branch. Here is
the changes log:

- Bugs fixed
   - Redirector does not translate response's entity location reference.
 Issue #1069.
   - Fixed tunnelFilter. + symbol (%2b) converted incorrectly when
media
 query parameter is used. Issue #804.
 Reported by Rob Elsner.
   - Fixed never ending call when an exception happens while writing
the
 response's entity using the internal HTTP server connector.
 Issue #1061. Reported by Gernot Pansy.
   - Prevented insertion of query params into POST request for JAX-RS
client.
 Issue #1072. Reported by Edouard Mercier.
   - Fixed NPE when OAuth refresh token request when no scope is
provided.
 Issue #1080. Reported by Gernot Pansy.
   - Internal HTTP client doesn't fail anymore with null values in
headers.
   - Improved robustness of Swagger translation code (import/export).
   - Fixed security scheme issue in RAML translator.

- Enhancements
   - Allowed spaces in the values of the Java methods annotations.
Issue #1099.
   - Added support for Chromium browser when extracting user agent info.
   - Added Swagger 2.0 import support in Swagger and APISPark
extensions.

Download link:
http://restlet.com/downloads/current/

Thanks,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel

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

Re: Restelt Client Internal Connector Error (1002)

2015-03-10 Thread Jerome Louvel
Hello Chirayu,

Is your server supposed to answer before the timeout observed?
Also, are you be able to upgrade to version 2.3.1 (stable)?

Best regards,
Jerome


On Tue, Mar 10, 2015 at 1:04 PM, Chirayu Desai chir...@purpledocs.com
wrote:

 I am using a restlet 2.1 client sever based architecture, my client times
 out
 within 1 minute after sending the request. and I get the following
 exception
 :
 Internal Connector Error (1002) - The calling thread timed out while
 waiting
 for a response to unblock it.
 at
 org.restlet.resource.ClientResource$1.invoke(ClientResource.java:1663)
 at com.sun.proxy.$Proxy17.getTaskList(Unknown Source)

 My code is as below :

 import org.restlet.resource.ClientResource;

 *ClientResource cr = new ClientResource(uri);
 MyResource resource= cr.wrap(MyResource .class);
 updateStatus =
 resource.updateData(Parameter);*

 how should I configure my client resource to avoid timeout ?



 --
 View this message in context:
 http://restlet-discuss.1400322.n2.nabble.com/Restelt-Client-Internal-Connector-Error-1002-tp7579347.html
 Sent from the Restlet Discuss mailing list archive at Nabble.com.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3104395


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

Re: Restelt Client Internal Connector Error (1002)

2015-03-10 Thread Jerome Louvel
If you need to stick with version 2.1, I recommend using the Apache HTTP
Client extension (see socketTimeout parameter):
http://restlet.com/technical-resources/restlet-framework/javadocs/2.1/jee/ext/org/restlet/ext/httpclient/HttpClientHelper.html

or the Net HTTP Client extension (see readTimeout parameter):
http://restlet.com/technical-resources/restlet-framework/javadocs/2.1/jee/ext/org/restlet/ext/net/HttpClientHelper.html

Jerome


On Tue, Mar 10, 2015 at 2:13 PM, Chirayu Desai chir...@purpledocs.com
wrote:

 No the request processing at server may or maynot take more than 1 minute,
 which means that the server may not necessaryly respond before timeout.

 On Wed, Mar 11, 2015 at 2:37 AM, Jerome Louvel-3 [via Restlet Discuss] 
 [hidden
 email] http:///user/SendEmail.jtp?type=nodenode=7579349i=0 wrote:

 Hello Chirayu,

 Is your server supposed to answer before the timeout observed?
 Also, are you be able to upgrade to version 2.3.1 (stable)?

 Best regards,
 Jerome


 On Tue, Mar 10, 2015 at 1:04 PM, Chirayu Desai [hidden email]
 http:///user/SendEmail.jtp?type=nodenode=7579348i=0 wrote:

 I am using a restlet 2.1 client sever based architecture, my client
 times out
 within 1 minute after sending the request. and I get the following
 exception
 :
 Internal Connector Error (1002) - The calling thread timed out while
 waiting
 for a response to unblock it.
 at
 org.restlet.resource.ClientResource$1.invoke(ClientResource.java:1663)
 at com.sun.proxy.$Proxy17.getTaskList(Unknown Source)

 My code is as below :

 import org.restlet.resource.ClientResource;

 *ClientResource cr = new ClientResource(uri);
 MyResource resource= cr.wrap(MyResource .class);
 updateStatus =
 resource.updateData(Parameter);*

 how should I configure my client resource to avoid timeout ?



 --
 View this message in context:
 http://restlet-discuss.1400322.n2.nabble.com/Restelt-Client-Internal-Connector-Error-1002-tp7579347.html
 Sent from the Restlet Discuss mailing list archive at Nabble.com.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3104395




 --
  If you reply to this email, your message will be added to the
 discussion below:

 http://restlet-discuss.1400322.n2.nabble.com/Restelt-Client-Internal-Connector-Error-1002-tp7579347p7579348.html
  To unsubscribe from Restelt Client Internal Connector Error (1002), click
 here.
 NAML
 http://restlet-discuss.1400322.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml




 --
 -Regards,
 -Chirayu Desai

 --
 View this message in context: Re: Restelt Client Internal Connector Error
 (1002)
 http://restlet-discuss.1400322.n2.nabble.com/Restelt-Client-Internal-Connector-Error-1002-tp7579347p7579349.html

 Sent from the Restlet Discuss mailing list archive
 http://restlet-discuss.1400322.n2.nabble.com/ at Nabble.com.


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

Re: Restlet server concurrency issue: Server handle multiple requests sequentially

2015-02-19 Thread Jerome Louvel
In RF v2.3 the internal HTTP server (based on JDK's basic HTTP server) now
also contains a thread pool, so that might help.
However, as pointed by Fabian, using a production ready connector such as
Jetty is recommended for serious loads.

Jerome


On Fri, Sep 26, 2014 at 12:24 PM, Fabian Mandelbaum fmandelb...@gmail.com
wrote:

 Hello,

 did you try adding one of the proven production-ready HTTP server
 connector jars on your class-path? for example Jetty. We use Restlet with
 Jetty HTTP(S) server connector in production without a problem and with
 many concurrent clients accessing our server/services.


 On Fri, Sep 26, 2014 at 3:33 PM, Audumbar Pujari audumbarpuj...@gmail.com
  wrote:

 Scenario :

-

I have implemented simple restlet server.
-

One client(RestClient / wget) or more than one client sending
GET/POST requests to server at same time. (eg: wget
http://mymachine.com:8182)

 Expected Behavior :

- Server needs to handle all requests concurrently.

 Actual Behavior :

- Server is handling all requests one by one (sequentially).

 Project link:

 I have created project on github.

 Link for project : https://github.com/paudumbar/TestRESTServer

 Am I missing any step in server creation?

 Thanks.

 Regards,

 Audumbar




 --
 Fabián Mandelbaum
 IS Engineer


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

Restlet Framework 2.3.1 released

2015-02-03 Thread Jerome Louvel
Hi all,

We have just pushed the first maintenance version on the stable branch.
Here are the bug fixed:

  - Reintroduced registration by default of the internal HTTP server
connectors in JEE edition.
  - FormDataSet not properly serializing text/plain files. Issue #1006.
Reported by johnjaylward.
  - Fixed fileupload extension for GAE and JEE editions.
  - Fixed potential NPE. Issue #1004.
Reported by Philippe Perrault.
  - Reference scheme reverts to http when using https. Issue #998.
Reported by Stephen C. Pope.
  - Fixed bug that prevented client code to properly consume error
responses #1004 and #1018.
Reported by Philippe Perrault and spraguep.

Thanks,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel

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

Restlet Framework 2.3.0 released!

2014-12-18 Thread Jerome Louvel
Hi all,

Check out the details about the new version here!
http://restlet.com/blog/2014/12/10/restlet-framework-2-3-0-released/

We also updated the technical documentation on the web site with better
styling, a navigation bar in the user guide and more. The Javadocs area
will get the update soon as well.
http://restlet.com/technical-resources/restlet-framework/

Thanks,
Jerome
--
@jlouvel http://twitter.com/#!/jlouvel

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

Restlet Framework 2.3 RC1 and 2.2.3 released

2014-11-28 Thread Jerome Louvel
Hi all,

We have just released version 2.3 RC1 that will soon become our new
stable version, as well a 2.2.3 that includes several bug fixes including
a critical security fix for Directory. Please test and send any feed-back,
2.3.0 is planned for next week!

Recent changes in the 2.3 branch include:

   - support for SPDY via the Jetty 9.2 extension,
   - automatic serialization of Java exceptions as HTTP error responses on
   both client-side and server-side via the @Status annotation, StatusService
   and ConverterService,
   - an enhanced APISpark extension including an API introspector for
   Restlet API/JAX-RS API/Jackson annotations as well as a firewall service
   with rate limitation (integration with APISpark is optional),
   - compatibility with GWT 2.7,
   - Jackson extension now configured to produce more compact JSON by
   ignoring null values by default,
   - update HTTP client connectors timeout default value to prevent
   connections to stay around forever if not consumed,
   - Swagger 1.2  2.0, RAML 0.8  support added and improved via dedicated
   extensions

Changes log for 2.3:
https://github.com/restlet/restlet-framework-java/blob/master/build/tmpl/text/changes.txt

Changes log for 2.2:
https://github.com/restlet/restlet-framework-java/blob/2.2/build/tmpl/text/changes.txt

To download those version:
http://restlet.com/downloads/current/

Thanks,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel

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

New Restlet web site and framework logo

2014-11-18 Thread Jerome Louvel
Hi all,

We just released our brand new Restlet web site this morning, with a new
visual identity and consolidating all our products, Restlet Framework,
APISpark (GA today) and the Restlet Studio (preview) in one place:
http://restlet.com

Here is also the new logo:

[image: Restlet Framework]

Note that some technical resources on the framework haven't been fully
migrated yet, but no worry we are actively working on them as I write.
Thanks for your patience and do not hesitate to report issue if they are
not fixed by the end of this week.

We are also completing version 2.3 of the framework including some great
contributions such as support for Swagger 1.2/2.0, RAML 0.8, Jetty 9.2
(client-side and SPDY), firewall with rate-limitation and more.

Stay tuned!
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel

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

Re: issues with setting Timeouts in Restlet

2014-11-10 Thread Jerome Louvel
Hi Santhos,

Which version of Restlet Framework are you using? 1.1.5 is a very old one.
Also, you need to let us know which HTTP client you are using as the
parameters vary depending on the connector (Apache HTTP Client, Jetty or
the internal/default one)

Thanks,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel






On Mon, Nov 10, 2014 at 12:43 PM, santosh pathak santos...@gmail.com
wrote:

 hi,In one of my project,I am new to restlet.
 I am using 1.1.5 version and using it for consuming a REST web service.

 I tried creating a client and tried setting the socket and connect Timeout
 in the context

 Client client = new
 Client(Protocol.HTTPclient.getContext().getParameters().add(readTimeout,some
 value);
 client.getContext().getParameters().add(socketTimeout,some value));

 None of the values that I set in context is recognized by restlet , I
 still see my thread waiting for response from back-end for endless time.

 What are the right context paramteres, that are needed for connection
 timeout and socket timeout? Appreciate help..

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3091082


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

RE: Redirect whole browser traffic to restlet proxy

2014-10-15 Thread Jerome Louvel
Hi Jovan,

Are you trying to setup a reverse proxy (server-side)?
If so, you need to set the mode to MODE_SERVER_OUTBOUND and use an URI template 
such as  http://www.google.com/{rr};.

See Javadocs as well:
http://restlet.com/learn/javadocs/snapshot/jee/api/org/restlet/routing/Redirector.html

Best regards,
Jerome

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


Restlet Framework 2.2.2 released

2014-08-05 Thread Jerome Louvel
Hi all,

We have just released a new version of our stable branch including a fix
for a regression in the Android edition generation process:
http://restlet.com/download/current

Thanks,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel

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

Fwd: Restlet.com download broken.

2014-08-01 Thread Jerome Louvel
Hi Robert,

I just did a test with the link you shared and it works for me.
Can you share your web browser and OS so we can investigate?

As a workaround, you might want to try using Maven distribution:
http://restlet.com/download/current

Thanks,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel


-- Forwarded message --
From: Robert Barnett barn...@rice.edu
Date: Thu, Jul 31, 2014 at 7:56 PM
Subject: Restlet.com download broken.
To: discuss@restlet.tigris.org


When attempting to download Restlet binaries from
http://restlet.com/download/2.2/restlet-jse-2.2.1.zip the download only
makes it to about 10 megs and then has a network error.

Please advise.

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

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

Re: API World competition support

2014-07-16 Thread Jerome Louvel
Thanks Xavier and all, it seems we are now in the first position :)

Stay tuned!
Jerome


On Tue, Jul 15, 2014 at 12:33 PM, Xavier Méhaut xavier.meh...@free.fr
wrote:

 done :)


 2014-07-15 21:15 GMT+02:00 Jerome Louvel jlou...@restlet.com:

 Hi all,

 Our APISpark https://apispark.com/ platform (based on Restlet
 Framework) is in 2nd position, not far from 1st, in the API Infrastructure
 category for the API World awards competition
 http://verticalize.me/technology/index?frmIndustry=frmProductCategory=175search_by=
 .

 The winners will get great exposure (see this previous visual landscape
 http://www.devnetwork.com/wp-content/uploads/2014/05/DevTechLandscape6.png
 from DevNetwork that put Restlet in a nice spot close to cool developer
 technologies) and free tickets to the event based in San Francisco.

 I would really appreciate your support to get a boost to first place! The
 voting ends in less than 12 hours. If we win, all remaining extra tickets
 will be given out to interested supporters.

  Thanks!
 Jerome
 --
 http://restlet.com
 @jlouvel http://twitter.com/#!/jlouvel







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

API World competition support

2014-07-15 Thread Jerome Louvel
Hi all,

Our APISpark https://apispark.com/ platform (based on Restlet Framework)
is in 2nd position, not far from 1st, in the API Infrastructure category
for the API World awards competition
http://verticalize.me/technology/index?frmIndustry=frmProductCategory=175search_by=
.

The winners will get great exposure (see this previous visual landscape
http://www.devnetwork.com/wp-content/uploads/2014/05/DevTechLandscape6.png
from DevNetwork that put Restlet in a nice spot close to cool developer
technologies) and free tickets to the event based in San Francisco.

I would really appreciate your support to get a boost to first place! The
voting ends in less than 12 hours. If we win, all remaining extra tickets
will be given out to interested supporters.

Thanks!
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel

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

Re: Re: Getting Started with Restlet

2014-07-12 Thread Jerome Louvel
Hi Tejas,

You might want to check out the new tutorial we have been working on:
https://github.com/restlet/restlet-tutorial

Otherwise, there is 'Restlet in Action' book that might help.

Thanks,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel







On Sat, Jul 12, 2014 at 3:49 AM, Tejas Dharamsi m...@tejasdharamsi.in
wrote:

 I have gone through these. Could you suggest any detailed tutorial with
 json.

 Thanks

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3084998


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

Re: Handling multiple environments

2014-06-25 Thread Jerome Louvel
Hi Tim,

As long as your template use proper relative URIs (not starting with any
'/', but potentially with '..' to move up the hierarchy then you should be
fine with a http://TEST_SERVER:8080/restlet/{env}/
http://test_server:8080/restlet/%7Benv%7D/ base URI.

You don't need to manually change the rootRef or the resourceRef as
this is already done automatically during the call routing. To get the
current base URI, you just call request.getResourceRef().getBaseRef() or
getRemainingPart().

Hope this helps,
Jerome



On Wed, Jun 25, 2014 at 2:32 AM, Tim t...@fathers.me.uk wrote:

 Hello,

 We have a legacy system comprising two servers and up to 5 different
 environments that look a bit like this:

 TEST_SERVER -- Dev / Test / QA / Ref
 LIVE_SERVER -- Live

 So the TEST_SERVER has 4 environments and the LIVE_SERVER just the one. To
 add to the confusion, the servers host both the RESTlet instances (under
 Tomcat) and the backend database, and the web apps are able to connect to
 the databases of either machine. In other words, you can be accessing the
 HTTP server of the test machine, but connect to the database of the live
 machine.

 For reasons explained here
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3075356
 I'm trying to develop a system using RESTlet where the model is
 implemented using stored procedures on the back-end system which can be
 mapped to URLs by configuration alone. The idea being that to implement
 some new business logic a stored procedure is written and then a new URL
 template mapping to that procedure is added to the configuration (and the
 app restarted to reload the routes). My RESTlet application provides the
 glue between the stored procedures and the web and automatically maps the
 parameters in the URL template, query parameters etc. to the stored
 procedure parameters prior to the call. The result from the stored
 procedures is then used as the model for Freemarker templates to create the
 desired representation, according to the accepts header and the template
 provided in the configuration for the stored procedure in question.

 Although it's very much at the prototype stage it seems to work very well
 so far (largely thanks to Tim's help in the thread mentioned above!).

 My problem is how best to deal with the multiple environments and
 especially how to make sure that relative URLs stay relative to the correct
 environment. I suspect this would be a good case for virtual hosts, with a
 separate VH for each environment like this:

 http://{env}.TEST_SERVER:8080/ where env is the database/environment.
 This way I guess any URLs relative to the root ref will point to the
 correct environment.

 However, our network set-up doesn't allow me to use sub-domains, and that
 isn't likely to change, so I think the only other approach I have is to do
 this:

 http://TEST_SERVER:8080/restlet/{env}/

 In this case, I would like the URL above to become the root so that any
 relative URLs specified are always relative this base part and it can be
 added to the Freemarker model to enable templates to generate URLs for
 links etc. with the correct base.

 I thought perhaps this could be done by chaining routers such that the
 initial root is this:

 http://TEST_SERVER:8080/restlet/{env}/

 and have a restlet attached which changes the request's rootRef to the
 resourceRef and then chaining the routers for the remaining part of the
 URLs after.

 Would this work or is there a better way to approach the whole problem?
 Any ideas and suggestion would be very welome!!

 TIA,

 Tim.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3083882


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

Re: Announcing HTML newsletter and Restlet web API platform

2014-06-18 Thread Jerome Louvel
Hello,

Stackoverflow is pretty active for restlet tagged questions, see this
list of newest questions:
http://stackoverflow.com/questions/tagged/restlet?sort=newest

Also, some don't have an accepted answers but do have comments and
discussions.
What is your pending question?

Thanks,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel




On Tue, Jun 17, 2014 at 10:28 PM, Xybrek xyb...@gmail.com wrote:

 On Wednesday, 07 May, 2014 12:05 PM, Jerome Louvel wrote:
  Hi all,
 
  Starting with the Restlet Framework 2.3 M2 and 2.2.1 versions released
  today, we will be announcing the new releases and security updates via
  an *HTML newsletter*. As always, we cross post the content to our blog
  
 http://blog.restlet.com/2014/05/06/restlet-framework-2-2-1-and-2-3-m2-released/
 and Twitter
  @restlet_org https://twitter.com/restlet_org/ account.
 
  Registering to Tigris.org is a real barrier for new users who often
  prefer to reach out on StackOverFlow or Twitter, so we think that
  offering this direct information channel is necessary. We are also
  planning to migrate from Tigris to Google Groups later this year.
 
  To kick things off, we on-boarded existing subscribers to this mailing
  list and also offer a clear way to subscribe to this newsletter when
  downloading the framework http://restlet.org/download/current. If
  needed, unsubscribing is just one click away.
 
  We are also building some synergies between the open source Restlet
  Framework and the APISpark full-stack PaaS under the *Restlet web API
  platform* project at Restlet.org (see updated web site
  http://restlet.org) to provide additional value to our open source
  community on the following fronts:
 
   1. API documentation (during development, once published, multiple
  versions)
   2. API crafting (design contract, generate server skeleton)
   3. API usage (client SDKs, self-registration, sand-boxing, forking)
   4. API management (firewall, rate limitation, usage reports)
   5. API hosting (multi-tenant, containerization, cross-region)
 
  As always, we look forward to better serving our community and welcome
  any feed-back and contributions!
 
  Thanks,
  Jerome
  --
  http://restlet.org http://restlet.org/
  @jlouvel http://twitter.com/#!/jlouvel
 

 Yes, in fact supporting stackoverflow.com is great. Very few questions
 there and fewer answers as I have searched.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3083489


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

RE: Re: How to remove URL form thread name?

2014-06-13 Thread Jerome Louvel
Thanks Paul for the update, great to know that you solved it!

Best regards,
Jerome


 Found it. Yes this is a Jetty feature and it is only enabled when debug 
 logging is on.
 
 https://github.com/eclipse/jetty.project/blob/jetty-8.1.5.v20120716/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java#L417

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


RE: Re: How to remove URL form thread name?

2014-06-06 Thread Jerome Louvel
Hi Paul,

I suspect this is a Jetty feature as well. If you use Jetty as a Restlet Server 
connector, you can have access to the underlying Jetty Server object (and then 
its thread pool) via this class:
http://restlet.com/learn/javadocs/snapshot/jse/ext/org/restlet/ext/jetty/JettyServerHelper.html

If you are using Jetty as a Servlet container, then you need to directly look 
at its configuration options.

Best regards,
Jerome

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


Restlet API evolution - Conversion between Throwable HTTP status+body

2014-06-05 Thread Jerome Louvel
Hi all,

In V2.3 of Restlet API, we would like to introduce automatic conversion
between Java throwable and HTTP status+body, working both ways (client and
server sides).

The goal is to be able to write annotated Java interfaces including methods
such as:

 @Get
 public MyBean represent() throws MyServerError, MyNotFoundError;

Were the MyServerError and MyNotFoundError could be serialized as
JSON/XML/eetc. error representations. For this you would annotate those
Throwable classes with a @Status annotation such as:

 @Status(500)
 public class MyServerError implements Throwable{
...
 }

 @Status(404)
 public class MyNotFoundError extends RuntimeException{
...
 }

A ClientResource wrapped proxy of MyResource including the represent()
method would automatically deserialize the error JSON/XML/etc. into the
proper Java exception.

A ServerResource implementing the MyResource would be able to directly
throw a MyServerError or a MyNotFoundError, setting its properties without
having to worry about the HTTP status and error body. Content negotiation
would even be able to take place.

Would that be useful in your web APIs? Any design feed-back?

Thanks,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel

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

Re: Restlet API evolution - Conversion between Throwable HTTP status+body

2014-06-05 Thread Jerome Louvel
Thanks Fabian for the feed-back.

1) We would not set the response entity in this case, only the HTTP status
would be set on the response based on the annotation value.

2) I'm not 100% clear about the scenario. Let me try some replies:

  a) if you do not throw any exception and manually set an error status and
response entity, then it would take precedence

  b) the goal is for your resource classes to actually define those
exceptions and ensure they are automatically handled at run-time.

  c) we might want to offer some generic exceptions such as
NotFoundExceptionT based on @Status for main HTTP status codes that would
let you override them to specify a custom T bean to serialize as response
entity but the HTTP status code would be automatically set.

Thanks,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel




On Thu, Jun 5, 2014 at 3:52 PM, Fabian Mandelbaum fmandelb...@gmail.com
wrote:

 I like the idea.

 Some comments:

 1) There's some statuses that do not allow for a response body, IIRC HTTP
 204. How would you handle that? Compile-time error? Other checks?

 2) If for any reason, my server resource class redefines one of those
 exceptions, how would this be handled? I'd expect the one redefined on my
 server resource is used...

 May add more comments/ideas later...

 Thanks.



 On Thu, Jun 5, 2014 at 7:20 PM, Jerome Louvel jlou...@restlet.com wrote:

 Hi all,

 In V2.3 of Restlet API, we would like to introduce automatic conversion
 between Java throwable and HTTP status+body, working both ways (client and
 server sides).

 The goal is to be able to write annotated Java interfaces including
 methods such as:

  @Get
  public MyBean represent() throws MyServerError, MyNotFoundError;

 Were the MyServerError and MyNotFoundError could be serialized as
 JSON/XML/eetc. error representations. For this you would annotate those
 Throwable classes with a @Status annotation such as:

  @Status(500)
  public class MyServerError implements Throwable{
 ...
  }

  @Status(404)
  public class MyNotFoundError extends RuntimeException{
 ...
  }

 A ClientResource wrapped proxy of MyResource including the represent()
 method would automatically deserialize the error JSON/XML/etc. into the
 proper Java exception.

 A ServerResource implementing the MyResource would be able to directly
 throw a MyServerError or a MyNotFoundError, setting its properties without
 having to worry about the HTTP status and error body. Content negotiation
 would even be able to take place.

 Would that be useful in your web APIs? Any design feed-back?

 Thanks,
 Jerome
 --
 http://restlet.com
 @jlouvel http://twitter.com/#!/jlouvel







 --
 Fabián Mandelbaum
 IS Engineer


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

Re: restlet support ssl

2014-06-05 Thread Jerome Louvel
Hi,

Restlet 1.1.1 is a pretty old version :)  If you have any chance, I
strongly suggest that you upgrade to version 2.2

Otherwise, HTTPS should work in your case if you configure properly your
Servlet container as it will be responsible for the HTTPS server connector
in your case.

Thanks,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel






On Thu, Jun 5, 2014 at 8:39 AM, 陈军 chen...@eetop.com wrote:

   Hello, I have a question, I configure the restlet, through the HTTP
 access can be a successful visit,but access through the
 HTTPS return is 404, I hope I can support HTTPS access,I now use the
 restlet version is 1.1.1, what solutions? Wait for the answer,thanks!   The
 following is my configuration: servlet
 servlet-namerestlet/servlet-name
 servlet-classcom.noelios.restlet.ext.spring.RestletFrameworkServlet/servlet-class
 load-on-startup1/load-on-startup   init-param
 param-nameorg.restlet.application/param-name
 param-value/param-value  /init-paraminit-param
 param-nameorg.restlet.clients/param-name  param-valueHTTP
 HTTPS FILE/param-value
 /init-param

init-param param-nameorg.restlet.autoWire/param-name
 param-valuetrue/param-value   /init-param/servlet




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

Re: Serve static content using SpringBeanRouter?

2014-06-04 Thread Jerome Louvel
Thanks Jorge for the follow-up with your solution!
I'm not sure why you get two GET calls. Can you try with a regular HTTP
client such as POSTMAN?

Jérôme



On Fri, May 30, 2014 at 9:00 AM, Jorge Gallardo jorgeagalla...@gmail.com
wrote:

 Thanks Jerome for the prompt reply.

 So after I got some rest I could address this with a clearer mind. I
 resolved it this way:


 *spring xml:*

 bean id=restletComponent class=org.restlet.ext.spring.SpringComponent
 

  !-- the defaultTarget for this component is our Restlet Application --

  property name=defaultTarget ref=restletApplication /

  property name=clientsList

  list

   valueCLAP/value

   valueFILE/value

  /list

  /property

 /bean


  bean id=restletApplication class=
 org.restlet.ext.wadl.WadlApplication

  scope=singleton

  !-- all requests to this Application will be sent to myPath2BeanRouter
 --

  property name=name value=REST API /

  !--property name=inboundRoot ref=authenticator / --

  property name=inboundRoot ref=springRouter /

  property name=encoderService.enabled value=true /

  /bean


  !-- Reslet component's Context bean --

 * bean id=restletComponent.context*

 * class=org.springframework.beans.factory.config.PropertyPathFactoryBean
 /*


  * bean id=restletContext factory-bean=restletComponent.context*

 * factory-method=createChildContext scope=prototype /*


 * bean name=/images autowire=byName scope=prototype*

 * class=com.zebra.rest.directory.ImagesDirectory*

 * constructor-arg ref=restletContext /*

 * /bean*


 !-- Singleton instance of this class --

  bean name=springRouter class=org.restlet.ext.spring.SpringBeanRouter
 /


 and then I created a simple Java class extending from Directory

 import org.restlet.Context;

 import org.restlet.resource.Directory;


 public class ImagesDirectory extends Directory {


 public ImagesDirectory(Context context) {

  super(context, clap://class/images);

 }

 }


 And Voilá! it worked.

 The only funny thing I see is double logging:

 May 30, 2014 10:59:46 AM org.restlet.engine.log.LogFilter afterHandle

 INFO: 2014-05-30 10:59:46 0:0:0:0:0:0:0:1 - 0:0:0:0:0:0:0:1 9091 GET
 /images/zebra_logo.png - 200 - 0 15 http://localhost:9091 Mozilla/5.0
 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko)
 Chrome/35.0.1916.114 Safari/537.36 -

 May 30, 2014 10:59:46 AM org.restlet.engine.log.LogFilter afterHandle

 INFO: 2014-05-30 10:59:46 0:0:0:0:0:0:0:1 - 0:0:0:0:0:0:0:1 9091 GET
 /images/zebra_logo.png - 200 - 0 1 http://localhost:9091 Mozilla/5.0
 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko)
 Chrome/35.0.1916.114 Safari/537.36 -

 Could be related to the clap protocol? Other than that, I debugged it and
 looks it is working as expected, nothing strange under the sun.


 Thanks!

 -JG




 On Thu, May 29, 2014 at 4:15 PM, Jerome Louvel jlou...@restlet.com
 wrote:

 Hi Jorge,

 Normally, you shouldn't embed a Directory inside a ServerResource but
 directly attach it to your SpringBeanRouter.
 To not have to use the {imageId} path variable (for your file names I
 guess), you can set the route's matchingMode to Template.STARTS_WITH. I'm
 not sure exactly how to do it with SpringBeanRouter, but with a regular
 router you would do this:

 myRouter.attach(/v1/images/,
 myDirectory).setMatchingMode(Template.STARTS_WITH).

 Thanks,
 Jerome
 --
 http://restlet.com
 @jlouvel http://twitter.com/#!/jlouvel




 On Thu, May 29, 2014 at 1:48 PM, Jorge Gallardo jorgeagalla...@gmail.com
  wrote:

 Hello all,

 Im trying to serve static content from the filesystem but I cant. I was
 able to do it with a plain and simple Reslet application but not using
 SpringBeanRouter.
 Here is the code:


 @Component(/v1/images/{imageId})

 @Scope(prototype)

 public class ImagesResource extends DirectoryServerResource {

 private String imageId;

 @Override

 public void doInit() throws ResourceException {

  Directory directory = new Directory(getContext(),

  file:///path/images);

  getRequestAttributes().put(org.restlet.directory, directory);

  super.doInit();

 }

 }
 And here the xml mapping:

  bean id=restletComponent class=
 org.restlet.ext.spring.SpringComponent

  property name=defaultTarget ref=restletApplication /

  property name=clientsList

  list

   valueCLAP/value

   valueFILE/value

  /list

  /property

 /bean

 bean id=restletApplication class=
 org.restlet.ext.wadl.WadlApplication

  scope=singleton

  property name=name value=REST API /

  property name=inboundRoot ref=ServerHeaderFilter /

  property name=encoderService.enabled value=true /

 /bean

  bean name=springRouter class=org.restlet.ext.spring.SpringBeanRouter
 /


 Im facing two issues:

 1- the URL mapping. If i use /v1/images, SpringBeanRouter does not
 match it, so I went for /v1/images/{imageId}

 2- If i dont put the Directory in the map, I get a NullPointerException.
 It looks odd, is there any other/better way of doing it?

 Thanks!
 --
 Jorge Gallardo

Re: Serve static content using SpringBeanRouter?

2014-05-29 Thread Jerome Louvel
Hi Jorge,

Normally, you shouldn't embed a Directory inside a ServerResource but
directly attach it to your SpringBeanRouter.
To not have to use the {imageId} path variable (for your file names I
guess), you can set the route's matchingMode to Template.STARTS_WITH. I'm
not sure exactly how to do it with SpringBeanRouter, but with a regular
router you would do this:

myRouter.attach(/v1/images/,
myDirectory).setMatchingMode(Template.STARTS_WITH).

Thanks,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel




On Thu, May 29, 2014 at 1:48 PM, Jorge Gallardo jorgeagalla...@gmail.comwrote:

 Hello all,

 Im trying to serve static content from the filesystem but I cant. I was
 able to do it with a plain and simple Reslet application but not using
 SpringBeanRouter.
 Here is the code:


 @Component(/v1/images/{imageId})

 @Scope(prototype)

 public class ImagesResource extends DirectoryServerResource {

 private String imageId;

 @Override

 public void doInit() throws ResourceException {

  Directory directory = new Directory(getContext(),

  file:///path/images);

  getRequestAttributes().put(org.restlet.directory, directory);

  super.doInit();

 }

 }
 And here the xml mapping:

  bean id=restletComponent class=
 org.restlet.ext.spring.SpringComponent

  property name=defaultTarget ref=restletApplication /

  property name=clientsList

  list

   valueCLAP/value

   valueFILE/value

  /list

  /property

 /bean

 bean id=restletApplication class=org.restlet.ext.wadl.WadlApplication

  scope=singleton

  property name=name value=REST API /

  property name=inboundRoot ref=ServerHeaderFilter /

  property name=encoderService.enabled value=true /

 /bean

  bean name=springRouter class=org.restlet.ext.spring.SpringBeanRouter
 /


 Im facing two issues:

 1- the URL mapping. If i use /v1/images, SpringBeanRouter does not match
 it, so I went for /v1/images/{imageId}

 2- If i dont put the Directory in the map, I get a NullPointerException.
 It looks odd, is there any other/better way of doing it?

 Thanks!
 --
 Jorge Gallardo
 
 jorgeagalla...@gmail.com


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

Re: Announcing HTML newsletter and Restlet web API platform

2014-05-20 Thread Jerome Louvel
Hi all,

For simplification purpose, this week we merged Restlet.org and Restlet.com
web sites into a single Restlet.com site based on the previous Restlet.org
content and design. Corporate content previously available on Restlet.com
has been quietly moved to an about us section http://restlet.com/about/.
Home page design was refined as well based on my previous message to better
present Restlet as a comprehensive web API platform including an open
source framework and a full stack PaaS.

Please update your bookmarks and Maven installs to point to
maven.restlet.com instead of maven.restlet.org. Proper redirections have
been put in place to make sure the transition is smooth for existing
inbound links.

Best regards,
Jerome
--
http://restlet.com
@jlouvel http://twitter.com/#!/jlouvel



On Tue, May 6, 2014 at 9:05 PM, Jerome Louvel jlou...@restlet.com wrote:

 Hi all,

 Starting with the Restlet Framework 2.3 M2 and 2.2.1 versions released
 today, we will be announcing the new releases and security updates via an 
 *HTML
 newsletter*. As always, we cross post the content to our 
 bloghttp://blog.restlet.com/2014/05/06/restlet-framework-2-2-1-and-2-3-m2-released/
  and Twitter @restlet_org https://twitter.com/restlet_org/ account.

 Registering to Tigris.org is a real barrier for new users who often prefer
 to reach out on StackOverFlow or Twitter, so we think that offering this
 direct information channel is necessary. We are also planning to migrate
 from Tigris to Google Groups later this year.

 To kick things off, we on-boarded existing subscribers to this mailing
 list and also offer a clear way to subscribe to this newsletter when 
 downloading
 the framework http://restlet.org/download/current. If needed,
 unsubscribing is just one click away.

 We are also building some synergies between the open source Restlet
 Framework and the APISpark full-stack PaaS under the *Restlet web API
 platform* project at Restlet.org (see updated web sitehttp://restlet.org)
 to provide additional value to our open source community on the following
 fronts:

1. API documentation (during development, once published, multiple
versions)
2. API crafting (design contract, generate server skeleton)
3. API usage (client SDKs, self-registration, sand-boxing, forking)
4. API management (firewall, rate limitation, usage reports)
5. API hosting (multi-tenant, containerization, cross-region)

 As always, we look forward to better serving our community and welcome any
 feed-back and contributions!

 Thanks,
 Jerome
 --
 http://restlet.org
 @jlouvel http://twitter.com/#!/jlouvel



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

Re: Authenticator and Component XML configuration

2014-05-13 Thread Jerome Louvel
Hi Sergio,

I think you should attach a Restlet Application subclass to your default
host.

Inside this application, you can add a ChallengeAuthenticator filter, then
a Router and attach your four resources to this router.

If you want to do it all in XML, maybe you should consider using Spring XML
support instead which is more flexible/powerful.

Thanks,
Jerome
--
http://restlet.org
@jlouvel http://twitter.com/#!/jlouvel





On Tue, May 13, 2014 at 6:11 AM, Sergio sertin...@gmail.com wrote:

 Hello,

 I'm quite a newbie with restlet. I'm creating an application with this
 resources:

 /
 /apps
 /apps/{id}
 /apps/{id}/objects

 To attach the different URI to resources I have used the XML component
 configuration:

 ?xml version=1.0?
 component xmlns=http://www.restlet.org/schemas/2.0/Component;
 name=AndroPi RESTful server
 description=Configures NAT and output interface for nodes into
 the inner network
 owner=GRC UPV
 author=Sergio Martínez Tornell
 client protocol=CLAP /
 server protocol=HTTP port=8080
 parameter name=tracing value=true /
 /server

 defaultHost
 attach uriPattern=/

 targetClass=es.upv.grc.andropi.server.RootServerResource/
 attach uriPattern=/apps

 targetClass=es.upv.grc.andropi.server.AppsServerResource/
 attach uriPattern=/apps/{appId}
 targetClass=es.upv.grc.andropi.server.AppServerResource/
 attach uriPattern=/apps/{appId}/objects
 targetClass=es.upv.grc.andropi.server.ObjectsServerResource/
 
 /defaultHost
 /component

 It works properly, but now I want to protect the /apps/{id} and
 /apps/{id}/objects from non-authorized users.

 I have read the book Restlet in action and the tutorials available on
 the website, but I can't find how to do it.

 How can I define a ChallengeAuthenticator to act as a filter to only come
 of my resources?

 Can I define the ChallengeAuthenticator only for som methods of my
 resources? for example to protect PUT or POST but keep GET public.

 Thank you very much.
 Sergio

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3078257


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

Announcing HTML newsletter and Restlet web API platform

2014-05-06 Thread Jerome Louvel
Hi all,

Starting with the Restlet Framework 2.3 M2 and 2.2.1 versions released
today, we will be announcing the new releases and security updates via an *HTML
newsletter*. As always, we cross post the content to our
bloghttp://blog.restlet.com/2014/05/06/restlet-framework-2-2-1-and-2-3-m2-released/
 and Twitter @restlet_org https://twitter.com/restlet_org/ account.

Registering to Tigris.org is a real barrier for new users who often prefer
to reach out on StackOverFlow or Twitter, so we think that offering this
direct information channel is necessary. We are also planning to migrate
from Tigris to Google Groups later this year.

To kick things off, we on-boarded existing subscribers to this mailing list
and also offer a clear way to subscribe to this newsletter when downloading
the framework http://restlet.org/download/current. If needed,
unsubscribing is just one click away.

We are also building some synergies between the open source Restlet
Framework and the APISpark full-stack PaaS under the *Restlet web API
platform* project at Restlet.org (see updated web site http://restlet.org)
to provide additional value to our open source community on the following
fronts:

   1. API documentation (during development, once published, multiple
   versions)
   2. API crafting (design contract, generate server skeleton)
   3. API usage (client SDKs, self-registration, sand-boxing, forking)
   4. API management (firewall, rate limitation, usage reports)
   5. API hosting (multi-tenant, containerization, cross-region)

As always, we look forward to better serving our community and welcome any
feed-back and contributions!

Thanks,
Jerome
--
http://restlet.org
@jlouvel http://twitter.com/#!/jlouvel

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

Re: Intermittent NPE in java.io.reader

2014-05-02 Thread Jerome Louvel
Hi Andy,

I'm not aware of this issue. It might be a bug so I encourage you to file a
GitHub issue.
Otherwise, have you tried to migrate to 2.1.7 or better to 2.2.0?

Regarding the range representation, you might want to try disable the
RangeService which filters all the API calls.
Just call getRangeService().setEnabled(false) on your Application subclass.

Thanks,
Jerome
--
http://restlet.org
@jlouvel http://twitter.com/#!/jlouvel




On Fri, Apr 25, 2014 at 3:11 PM, Andy Dennie tig...@adennie.e4ward.comwrote:

 Hi, I'm hoping maybe this problem looks familiar to somebody out there..

 I'm using Restlet 2.1.4 on GAE, and I'm seeing intermittent NPEs with the
 (partial) stack trace below.  This is happening on about 1% of requests.

 17:00:19.465 org.restlet.engine.io.BioUtils getReader: The GAE edition is
 unable to return a reader for a writer representation.
E 17:00:19.465 org.restlet.engine.adapter.ServerAdapter commit: An
 exception occured writing the response entity
 java.lang.NullPointerException
 at java.io.Reader.init(Reader.java:78)
 at java.io.BufferedReader.init(BufferedReader.java:94)
 at
 org.restlet.engine.io.ReaderInputStream.init(ReaderInputStream.java:101)
 at org.restlet.engine.io.BioUtils.getStream(BioUtils.java:354)
 at
 org.restlet.representation.CharacterRepresentation.getStream(CharacterRepresentation.java:70)
 at
 org.restlet.util.WrapperRepresentation.getStream(WrapperRepresentation.java:151)
 at
 org.restlet.engine.application.RangeRepresentation.getStream(RangeRepresentation.java:117)
 at
 org.restlet.engine.application.RangeRepresentation.write(RangeRepresentation.java:146)
 at
 org.restlet.engine.adapter.ServerCall.writeResponseBody(ServerCall.java:510)
 at
 org.restlet.engine.adapter.ServerCall.sendResponse(ServerCall.java:454)

 In the full stack trace further below, I've interspersed the source code
 at each stack level.  Here's my analysis so far:

 The Reader constructor has received a null lock parameter from its
 caller.
 BufferedReader is just passing its first argument (in, a Reader) to
 super, so in must be null.
 which means that in ReaderInputStream's constructor, reader is null
 which means that in BioUtils.getStream, reader (its first arg) is null
 which means that in CharacterRepresentation.getStream, getReader() is
 returning null

 CharacterRepresentation is abstract and doesn't implement getReader, so
 its implementation is coming from one of its subclasses.
 Since it is getting called from WrapperRepresentation.getStream, that
 indicates that the CharacterRepresentation is a wrapped representation.
 Since that is getting called from RangeRepresentation.getStream, we know
 that the wrapper is a RangeRepresentation, although we don't know what the
 wrapped representation is (other than it is derived from
 CharacterRepresentation)
 Since that is getting called from ServerCall.writeResponseBody, for the
 object entity, we know that entity is a RangeRepresentation.

 The problem is that I'm expecting entity to be a JacksonRepresentation,
 not a RangeRepresentation.  And I can't find any code that instantiates a
 RangeRepresention outside of RangeFilter, which I'm not using (to my
 knowledge).

 Any ideas?

 -Andy


W 17:00:19.465 org.restlet.engine.io.BioUtils getReader: The GAE
 edition is unable to return a reader for a writer representation.
E 17:00:19.465 org.restlet.engine.adapter.ServerAdapter commit: An
 exception occured writing the response entity
 java.lang.NullPointerException
 at java.io.Reader.init(Reader.java:78)

 protected Reader(Object lock) {
 if (lock == null) {
 throw new NullPointerException();

 at java.io.BufferedReader.init(BufferedReader.java:94)

 super(in);

 at
 org.restlet.engine.io.ReaderInputStream.init(ReaderInputStream.java:101)

 reader = (reader instanceof BufferedReader) ? (BufferedReader) reader :
 new BufferedReader(reader, IoUtils.BUFFER_SIZE);

 at org.restlet.engine.io.BioUtils.getStream(BioUtils.java:354)

 result = new ReaderInputStream(reader, characterSet);

 at
 org.restlet.representation.CharacterRepresentation.getStream(CharacterRepresentation.java:70)

 return BioUtils.getStream(getReader(), getCharacterSet());

 at
 org.restlet.util.WrapperRepresentation.getStream(WrapperRepresentation.java:151)

 return getWrappedRepresentation().getStream();

 at
 org.restlet.engine.application.RangeRepresentation.getStream(RangeRepresentation.java:117)

 return new RangeInputStream(super.getStream(), getSize(), getRange());

 at
 org.restlet.engine.application.RangeRepresentation.write(RangeRepresentation.java:146)

 BioUtils.copy(getStream(), outputStream);

 at
 org.restlet.engine.adapter.ServerCall.writeResponseBody(ServerCall.java:510)

 entity.write(responseEntityStream);

 at
 

Re: Re: Re: SSL Handshake Hangs

2014-04-25 Thread Jerome Louvel
Hi Roy,

Excellent, thanks for the feed-back!

BTW, I have fixed this issue in upcoming 2.2.1 so that manual registration
of the HTTPS server helper isn't even necessary.

Thanks,
Jerome
--
http://restlet.org
@jlouvel http://twitter.com/#!/jlouvel





On Fri, Apr 25, 2014 at 2:21 PM, Roy Olsen roy.ol...@pondersolutions.netwrote:

 Hi Jerome,

 Registering the server helper as you suggested solved the issue I had with
 2.2.0.  As you said with this version I only need to use the jars:
 org.restlet.jar
 org.restlet.ext.xml.jar

 Also, now that I'm using 2.2.0 my original problem is gone.

 Thanks for your help.

 Roy

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3077084


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

Re: Transparent reverse proxying using org.restlet.routing.Redirector

2014-04-24 Thread Jerome Louvel
Thanks for the feed-back Arjohn!

We have completely replaced the internal HTTP connector in 2.2 so that
certainly helped a lot.
I don't think 2.1.7 would solve your issue but that could be interesting to
confirm.

Best,
Jérôme



On Tue, Apr 22, 2014 at 1:45 AM, Arjohn Kampman 
arjohn.kamp...@vound-software.com wrote:

 We've updated from restlet 2.1.4 to 2.2.0 now and to our surprise this
 fixed the Redirector problems. In fact, Redirector works perfectly
 out-of-the-box, including the digest authentication. No subclassing
 required. So probably this was a bug in 2.1.4 that has been fixed
 somewhere in the 2.2 development.

 Regards,
 Arjohn

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3076835


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

Re: SSL Handshake Hangs

2014-04-23 Thread Jerome Louvel
Hi Roy,

In v2.2.0, the org.restlet.ext.ssl module has been split into:

   - an org.restlet.ext.jsslutils.jar module (not necessary for your case,
   integration with jSSLutils library for special SSL certificates)
   - the org.restlet.jar core module

So, you should be able to remove the org.restlet.ext.ssl.jar dependency
altogether and try again.

Thanks,
Jerome
--
http://restlet.org
@jlouvel http://twitter.com/#!/jlouvel






On Wed, Apr 23, 2014 at 2:51 PM, Roy Olsen roy.ol...@pondersolutions.netwrote:

 I'm finding that SSL connections fail with Restlet 2.1.7. When using curl
 to test it, the initial negotiation seems to work and I see the message
 TLS handshake, Finished, but then it hangs for about 30 seconds before
 curl returns an Unknown SSL protocol error message.

 I have a build of the same application using Restlet 1.1 that works fine
 when running this test with the same certificate.

 I was not able to do this test with Restlet 2.2.0. I can't figure out what
 to jars to use since I see no replacement for org.restlet.ext.ssl.jar

 The code I'm using to configure the server is:

Context context = component.getContext().createChildContext();
Server server = new Server(context, Protocol.HTTPS, portNo, component);
DefaultSslContextFactory sslContextFactory = new
 DefaultSslContextFactory();
sslContextFactory.setProtocol(SSL);
sslContextFactory.setKeyStoreType(JKS);
sslContextFactory.setKeyStorePath(config.getString(https.keystore));
sslContextFactory.setKeyStorePassword(storePass);
sslContextFactory.setKeyStoreKeyPassword(keyPass);
sslContextFactory.setKeyManagerAlgorithm(SunX509);
server.getContext().getAttributes().put(sslContextFactory,
 sslContextFactory);
serverList.add(server);

 Here's the output from curl:

curl -v -k -d @POSample1.xml https://localhost
* About to connect() to localhost port 443 (#0)
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
(HANGS AT THIS POINT)
* Unknown SSL protocol error in connection to localhost:443
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to localhost:443

 Here's that last part of what's logged by the server before the connection
 process hangs:

SESSION KEYGEN:
PreMaster Secret:
:
0010:
0020:
0030:
0040:
0050:
CONNECTION KEYGEN:
Client Nonce:
:
0010:
Server Nonce:
:
0010:
Master Secret:
:
0010:
0020:
Client MAC write Secret:
:
0010:
Server MAC write Secret:
:
0010:
Client write key:
:
0010:
Server write key:
:
0010:
Client write IV:
:
Server write IV:
:
[read] MD5 and SHA1 hashes:  len = 102
:
0010:
0020:
0030:
0040:
0050:
0060:

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3076942


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

Re: Re: SSL Handshake Hangs

2014-04-23 Thread Jerome Louvel
Hi Roy,

Thanks for the test, you spotted a bug in 2.2.0. The internal HTTPS server
isn't properly registered with the engine.
While we fix it for the upcoming 2.2.1, you can add this line somewhere
before creating your HTTPS server:

Engine.getInstance().getRegisteredServers().add(
new org.restlet.engine.connector.HttpsServerHelper(null));

Hope this helps,
Jerome





On Wed, Apr 23, 2014 at 3:52 PM, Roy Olsen roy.ol...@pondersolutions.netwrote:

 Hi Jerome,

 Using the three jars from 2.2.0:
org.restlet.jar
org.restlet.ext.jsslutils.jar
org.restlet.ext.xml.jar

 I'm getting the error No available server connector supports the required
 protocols: 'HTTPS' . Please add the JAR of a matching connector to your
 classpath.

 Thanks,

 Roy


  Hi Roy,
 
  In v2.2.0, the org.restlet.ext.ssl module has been split into:
 
 - an org.restlet.ext.jsslutils.jar module (not necessary for your
 case,
 integration with jSSLutils library for special SSL certificates)
 - the org.restlet.jar core module
 
  So, you should be able to remove the org.restlet.ext.ssl.jar dependency
  altogether and try again.
 
  Thanks,
  Jerome
  --
  http://restlet.org
  @jlouvel http://twitter.com/#!/jlouvel
 
 

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3076948


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

Re: vert.x

2014-03-31 Thread Jerome Louvel
Hi Pieter,

Thanks again for your feed-back. Based on additional input, I've decided to
add Vert.x support in Restlet Framework 2.3 road map!
https://github.com/restlet/restlet-framework-java/wiki/Road-map-of-version-2.3

See this specific RFE issue as well:
https://github.com/restlet/restlet-framework-java/issues/902

Your help would be welcome to precise what should be added in the Vert.x
support. I have three things in mind at this point:

   - an additional HTTP connector based on Vert.x / Netty
   - a Vert.x edition of Restlet Framework, similar to the OSGi edition
   - register Vert.x modules in the registry http://modulereg.vertx.io/

Thanks,
Jerome
--
http://restlet.org
@jlouvel http://twitter.com/#!/jlouvel




2013-06-22 1:02 GMT-07:00 Pieter Martin pietermar...@lavabit.com:

  Hi,

 My interest in the vert.x connector is not so much in the http connector
 itself as in being able to use the Restlet api inside of a vert.x
 environment. Similar to how I can now use restlet inside a JEE environment.

 My ideal situation is to be able to write my rest resources in Restlet and
 deploy it in any environment. Be it simple/jetty/tomcat/grizzly or now
 vert.x.

 It is vert.x build in support for WebSockets and SockJs that is making me,
 in particular, interested in using it.

 Thanks
 Pieter


 On 21/06/2013 03:26, Jerome Louvel wrote:

 Hi Pieter,

  As long as it brings value compared to the existing Jetty and Simple
 connectors, in term of scalability and throughput for example, then it
 definitely makes sense.

  The issue with extension is that they need to be documented and
 maintained on the long run, so it needs to really make a difference :)

 Best regards,
 Jerome
 --
 http://restlet.org
 http://twitter.com/#!/jlouvel




 2013/6/20 Pieter Martin pietermar...@lavabit.com

 Hi,

 Is a http connector for using restlet inside http://vertx.io/ something
 that would be considered?

 Thanks
 Pieter

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3058658


  Your personal email. Anytime, anywhere.
 Ridiculously affordable at $19.95. No contracts.
 http://www.getpeek.com/lavabit.html




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

Re: Restlet Framework 2.2.0 and 2.3 M1 released!

2014-03-28 Thread Jerome Louvel
Thanks Adam!

BTW, here as additional requests we just had for the 2.3 road map:

   - Java generics as representation roots
   - WebSocket protocol (RESTful way)
   -
   
https://github.com/restlet/restlet-framework-java/wiki/Road-map-of-version-2.3

It's time to share your needs and wishes!

Jerome




2014-03-28 3:54 GMT-07:00 Adam Mc a...@cs.miami.edu:

 Congrats!  It is a great framework!


 On Thu, Mar 27, 2014 at 7:32 PM, Jerome Louvel jlou...@restlet.comwrote:

 We are pretty happy to release this new major version, 1,5 years after
 2.1.0.

 Almost 10 years after its launch, our open source project is thriving,
 with almost 90k downloads just for February!!

 Check out the blog post for all details:

 http://blog.restlet.com/2014/03/27/restlet-framework-2-2-0-and-2-3-m1-released/

 Help us spread the word on social networks!
 https://news.ycombinator.com/item?id=7484211
 https://twitter.com/restlet_org/status/449306121472200705

 Best,
 Jerome




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

Restlet Framework 2.2.0 and 2.3 M1 released!

2014-03-27 Thread Jerome Louvel
We are pretty happy to release this new major version, 1,5 years after
2.1.0.

Almost 10 years after its launch, our open source project is thriving, with
almost 90k downloads just for February!!

Check out the blog post for all details:
http://blog.restlet.com/2014/03/27/restlet-framework-2-2-0-and-2-3-m1-released/

Help us spread the word on social networks!
https://news.ycombinator.com/item?id=7484211
https://twitter.com/restlet_org/status/449306121472200705

Best,
Jerome

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

Re: Using ClientConnector on GAE

2014-03-20 Thread Jerome Louvel
Alex,

In 2.2 RC1, we replaced the internal connector in *org.restlet* by the
*org.restlet.ext.net
http://org.restlet.ext.net* extension which should work fine with GAE.

It is possible that some regression occured in the GAE distribution. I've
entered this issue to fix this before 2.2.0:
https://github.com/restlet/restlet-framework-java/issues/876

Best,
Jerome




2014-03-19 11:44 GMT-07:00 Alex Harvey a...@9poundhammer.com:

 Prior to 2.2-RC1 we were able to use ClientResource correctly on App
 Engine with the .gae extension dependencies. However, we are no longer able
 to do so and receive a client connector error regarding the HTTP and HTTPS
 protocol jar being missing. Is this intended behavior? From the build notes
 these classes were to be included in the core jar.

 Even with the simplest hello world example and using the .gae extension
 insead of .jse this issue is reproducible.

 Mar 19, 2014 1:38:24 PM org.restlet.engine.Engine createHelper
 WARNING: No available client connector supports the required protocols:
 'HTTP' . Please add the JAR of a matching connector to your classpath.
 Mar 19, 2014 1:38:24 PM org.restlet.resource.ClientResource retry
 INFO: A recoverable error was detected (1002), attempting again in 2000 ms.
 Mar 19, 2014 1:38:26 PM org.restlet.resource.ClientResource retry
 INFO: A recoverable error was detected (1002), attempting again in 2000 ms.
 Exception in thread main Internal Connector Error (1002) - No available
 client connector supports the required protocol: 'HTTP'. Please add the JAR
 of a matching connector to your classpath.
 at
 org.restlet.resource.ClientResource.doError(ClientResource.java:599)
 at
 org.restlet.resource.ClientResource.handleInbound(ClientResource.java:1165)
 at
 org.restlet.resource.ClientResource.handle(ClientResource.java:1060)
 at
 org.restlet.resource.ClientResource.handle(ClientResource.java:1035)
 at
 org.restlet.resource.ClientResource.handle(ClientResource.java:937)
 at org.restlet.resource.ClientResource.get(ClientResource.java:645)

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3074844


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

Restlet Framework 2.2 RC4 released

2014-03-19 Thread Jerome Louvel
Hi all,

Version 2.2 RC4 version is now ready for testing. This is the last version
before 2.2.0 next week which will become the new *stable* release of
Restlet Framework.

Here are the main changes:

   - Swagger extension was updated to version 2.1
  - TODO: support for Restlet API beside JAX-RS API and Swagger UI
  embedding
   - several SSL/HTTPS bugs were fixed
  - includes better org.restlet.ext.nio connector stability
   - better support for empty response entities

To download, follow this link, including a way to get notified by email of
new releases:
http://restlet.org/download/current#release=testing

Also, automated builds based on Travis CI and its nice integration with
GitHub (including pending pull requests) are now passing:
https://travis-ci.org/restlet/restlet-framework-java

I've also added this visual button at the bottom of the GitHub project page:
https://github.com/restlet/restlet-framework-java

[image: Images intégrées 1]

Enjoy!
Jerome

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

Re: Restlet Framework 2.2 RC3 released

2014-03-06 Thread Jerome Louvel
Hi Arjohn,

We had another report for this issue that we just fixed:
https://github.com/restlet/restlet-framework-java/issues/848

It will be part of 2.2 RC4 due early next week. Let us know if it works for
you.

Best regards,
Jerome



2014-03-06 0:57 GMT-08:00 Arjohn Kampman arjohn.kamp...@vound-software.com
:

 Hi Jerome,

 Will this release also change how empty entity are treated? We've been
 bitten a couple of times now by restlet's habbit to convert empty
 entities to null.

 Cheers,
 Arjohn

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3074087


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

Re: Restlet Framework 2.2 RC3 released

2014-03-06 Thread Jerome Louvel
Thanks Arjohn for reporting this again.

I have just entered an issue that we'll try to fix before 2.2.0:
https://github.com/restlet/restlet-framework-java/issues/861

Do you think you could contribute a fix/pull request?

Best,
Jerome



2014-03-06 12:32 GMT-08:00 Arjohn Kampman arjohn.kamp...@vound-software.com
:

 Hi Jerome,

 Great to hear that.

 We were also having problem with incoming entities. To give an example:

 SomeServerResource {
 @Post void postIdSet(IdSet idSet) {
// code here
 }
 }

 An empty IdSet is serialized to an empty entity (byte[0]). We'd expect
 the converter service to deserialize the entity back to an empty IdSet,
 but that converter is never invoked and restlet passes null for the
 idSet parameter instead.

 I've posted a related question to this list some time ago, see

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2950796

 Looking at the code in GitHub, I don't think that this has been fixed
 yet. Could you have a look?

 Cheers,
 Arjohn

 On 06/03/2014 20:20, Jerome Louvel wrote:
  Hi Arjohn,
 
  We had another report for this issue that we just fixed:
  https://github.com/restlet/restlet-framework-java/issues/848
 
  It will be part of 2.2 RC4 due early next week. Let us know if it
  works for you.
 
  Best regards,
  Jerome
 

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3074126


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

Restlet Framework 2.2 RC3 released

2014-03-05 Thread Jerome Louvel
Hi all,

We are quickly progressing towards our 2.2.0 release with another release
candidate 3 available:
http://restlet.org/download/current

Here are the latest changes http://restlet.org/learn/2.2/changes since
2.2 RC1:

   - Add JSON related media types.
   - Moved all the remaining NIO logic from previous internal HTTP
   connector to the org.restlet.ext.nio.
  - this helps reduce org.restlet.jar file size
  - now org.restlet.jar has a size of 668Kb
  - 50 Kb saved compared to version 2.1.7
   - Call.isBroken does not detect Tomcat ClientAbortException.
   - DELETE responses send 200 status without any entity, whereas it should
   be 204.
   - NioUtils.copy(..) logic that sometimes created Cyclic barrier
   exceptions has been moved as well and replaced with the older and more
   stable logic that was in place in version 2.1.0 and older releases.
   - Allow Delete methods with entities
   - Allow configuring Apache HTTP Client's HostnameVerifier
   - Short term fix for XStream - remote code execution due to insecure XML
   deserialization

Next 2.2 RC4 
plannedhttps://github.com/restlet/restlet-framework-java/issues?milestone=21page=1state=openat
the end of this week should include:

   - Swagger ext enhancements to support Restlet API introspection in
   addition to JAX-RS API
   - improve web site for Maven and Eclipse downloads + email notifications
   - Git branch creation for Restlet Framework V3

Please continue contributing tests and pull requests!

Thanks,
Jerome
--
http://restlet.org
@jlouvel http://twitter.com/#!/jlouvel

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

Restlet 2.1.7 and 2.2 RC1 released

2014-02-13 Thread Jerome Louvel
Hi all,

Earlier this week, we released two new versions:
http://blog.restlet.com/2014/02/13/restlet-framework-2-1-7-and-2-2-rc1-released/

Please make sure to read, important security updates, updated road map,
enhancements and more!

Best regards,
Jerome
--
http://restlet.org
*@jlouvel http://twitter.com/#!/jlouvel*

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

Re: propagating conversion exception reason back to client in response body

2014-02-13 Thread Jerome Louvel
Hi Andy,

Indeed this was added to Restlet API in 2.2. We won't backport to 2.1 as we
don't change API for released version except for critical issues.

However, version 2.2 is getting close to stable status, so hopefully you'll
be able to migrate soon.

Thanks,
Jerome
--
http://restlet.org
@jlouvel http://twitter.com/#!/jlouvel





2014-01-07 6:16 GMT-08:00 Andy Dennie tig...@adennie.e4ward.com:

 Hold on, it looks like there was an update to ConverterService about a
 year ago that addressed this (by  no longer squelching the exception).
  It's just not in 2.1, which is what I'm using.  Any chance it might be
 backported to 2.1?

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3071299


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

Re: How to use maven with self compiled restlet

2014-02-11 Thread Jerome Louvel
Hi Ralph,

Could you let us know which error message you get via Gradle?
When you access directly the maven.restlet.org repository with Gradle, does
it work fine?

Best,
Jerome



2014-02-09 23:51 GMT-08:00 Ralph van Etten ra...@et10.org:

 Hi,

 I wanted to try the newest bugfixes and cloned the restlet repo and build
 it myself with

 ant -Ddo-maven=true

 It compiled fine and created a dist/maven2

 I tried using that directory as repository with Gradle but it did not
 work. It does not recognize the directory as maven repo.
 Is there an easy way to install restlet in my local maven repository so
 Gradle will pick it up? Or is there a better way to do this?

 Thanks,

 Ralph.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3072788


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

Re: How to use CookieAuthenticator?

2014-02-11 Thread Jerome Louvel
Hi all,

Based on this ongoing discussion, it would be clearly useful to include a
CookieAuthenticator example in Restlet user guide.

Added new issue. If anyone wants to contribute a Markdown page for this
that would be great:
https://github.com/restlet/restlet-framework-java/issues/837

Also, I've entered a RFE to include the client IP address and reduce risk
of replay attacks:
https://github.com/restlet/restlet-framework-java/issues/838

Best regards,
Jerome



2014-02-11 2:35 GMT-08:00 Ramesh Kumar rameshj1...@gmail.com:

 Pieter Martin pietermartin at lavabit.com writes:

 
  Hi,
 
  Took me a while but I did get it working,
 
  Here is what I did.
 
  In my restlet application I set up the CookieAuthenticator as follows
 
  public class CMRestletApplication extends Application {...
 


 Hi Pieter Martin,

 Thanks for the example.

 I tried to follow it. I am stuck with the /rest/special/loginPost action.

 Can you please post the code for the loginPost request ?

 I have a
 secretverifier implementation which is not called for cookie authenticator.

 Thanks,
 Ramesh

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3072851


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

GitHub issues reorganization

2014-02-06 Thread Jerome Louvel
Hi all,

In preparation of the new Restlet Framework 3.0 dev cycle, some clean-up
was due in our GitHub issue
trackerhttps://github.com/restlet/restlet-framework-java/issues
.

I have just reorganized the tags for clarity and constency based on our
recent experience. We now have six aspects/dimensions for an issue:

   - *Distribution: *Zip | Maven | Eclipse (p2) | Windows
   - *Version: *2.1 | 2.2 | 3.0
   - *Edition: *Android | GAE |GWT | Java SE | Java EE | OSGi
   - *Module: *Restlet API | Restlet Engine | Forge | Documentation
   - *Extension: *Atom | Crypto | ...
   - *State: *new | analysis | implementation | testing | escalated
   - *Type: *bug | feature | enhancement | task
   - *Priority: *critical | high | medium | low

Work still has to be done to properly label existing issues, but when you
enter new issues, please try to properly set the labels for each dimension.

I've also cleaned up our milestones so provide the realistic set of issues
that we are working on instead of the desired set. We will now use the
Priority level to express this.

Here is the current set of milestones we have:

   - 2.1.7 : due tomorrow
   - 2.2 
RC1https://github.com/restlet/restlet-framework-java/issues?milestone=6state=open
:
   due tomorrow
   - 2.2.0 : due end of February
   - 3.0 
M1https://github.com/restlet/restlet-framework-java/issues?milestone=17state=open
: due
   end of February
   - 
Unplannedhttps://github.com/restlet/restlet-framework-java/issues?milestone=7state=open

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel

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

RE: Default routing mode change

2014-02-06 Thread Jerome Louvel
Hi all,

We are going to move forward with an important Restlet API refactoring for 3.0 
M1 (planned for end of this month) discussed in this thread.

The goal is to introduce proper Java enumerations in order to replace the 
String constants used all over the framework.

This is a long-time request that we finally have the opportunity to address in 
the 3.x dev cycle (which allows use to significantly break backward API 
compatibility, providing a clear upgrade path though).

Thanks,
Jerome

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


Re: VirtualHost configuration

2014-01-12 Thread Jerome Louvel
Hi Tal,

The hostPort lets you restrict not only the virtual domain name served by
your virtual host, but also its port number, so you could have one separate
virtual host per port number in theory.

The resourcePort could potentially be different from the hostPort if the
HTTP request URI was provided in absolute form:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2

The serverPort is a property that restrict your virtual host to the actual
listening port of your server socket, which might be different fro the
hostPort when using port rerouting.

Best regards,
Jerome



2013/2/7 Tal Liron tal.li...@threecrickets.com

 I use virtual hosts a lot, but I almost always use setResourcePort so
 that applications can work on different ports. I'm wondering:

 1) What is setServerPort for?
 2) What is setHostPort for?

 Setting either of these seems to make no different in routing incoming
 requests.

 The JavaDocs for VirtualHost are very lean, and could definitely use
 some more detail!

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3047996


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

Re: Apache HttpClient timeouts

2014-01-12 Thread Jerome Louvel
Tal,

That's correct that those parameters are mostly used on a per connector
basis, and not a per request basis.

I don't think it is a limitation of Apache HTTP Client which should be able
to configure these parameters on a per connection basis, but more a Restlet
API limitation.

Some room for improvement for RF 3.0 maybe:
https://github.com/restlet/restlet-framework-java/issues/815

Best regards,
Jerome



2013/11/5 Tal Liron tal.li...@threecrickets.com

 I know that it's possible to globally configure the socketTimeout
 parameter for the HttpClientHelper. However, is it really impossible to
 configure a different timeout per request?

 In my experimentation, whatever I set in the context for a particular
 ClientResource is ignored. It seems that the timeout is only initialized
 once.

 Is this due to a limitation in Apache HttpClient?

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3067933


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

Extensions refactoring (Net, SSL and Core)

2014-01-12 Thread Jerome Louvel
Hi all,

Quite a bit of changes have been made to RF 2.2 branch (upcoming 2.2 M7
version) in order to solve several issues:

   - internal NIO-based connectors in org.restlet.jar still lack stability
   and were moved to an org.restlet.ext.nio module to let them mature further

   - new internal connectors have been added based on the existing
   org.restlet.ext.net module (removed) for the client side
   (java.net.HttpURLConnection) and based on com.sun.net.httpserver for the
   server-side (HTTP/HTTPS) as we are now on JDK 6 which includes this
   lightweight web server.

   - the SSL extension was split into an org.restlet.ext.jsslutils
   extension for integration with the third-party jSSLutils library, and for
   the rest moved to either org.restlet.ext.nio for the HTTPS internal
   connectors, or to the core org.restlet module for the common SSL support
   classes, removing an extra dependency for many extensions such as Jetty,
   Simple and Apache HTTP Client. There is now also the
   CertificateAuthenticator in the org.restlet.security package.

An additional benefit will be that Android extension users won't need to
manually configure the Net extension anymore to get the HTTP client
working. The org.restlet.jar will also be smaller, improving the download
size.

We still need to work on updating the test suite to ensure that all
connectors are properly tested, but almost all test cases now pass with the
new internal connector, for those who want to give them a try.

Best regards,
Jerome

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

Re: Re: NPE when using WADL extension auto transform to HTML feature

2014-01-11 Thread Jerome Louvel
Hi all,

It seems that this issue is still present, please follow this ticket for
updates:
https://github.com/restlet/restlet-framework-java/issues/692

Best regards,
Jerome



2013/4/21 jeremy jeremy.gir...@gmail.com

 Any news ...

 The error is still present in 2.1.2  (jse edition)

 thanks

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3053859


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

Re: Re: Re: Re: Re: Jetty 9?

2013-12-26 Thread Jerome Louvel
Hi Tal,

In RF 3.0, we should really give more precise control regarding extensions
usage for:

   - connectors
   - converters
   - authenticators

The configuration of a Restlet component or application should be explicit
and fully available programmatically.

I'm even considering fully removing the classpath based auto-registration
as it seems to create more problems than solutions.

Best regards,
Jerome



2013/11/26 Tal Liron tal.li...@threecrickets.com

 Actually, it's a feature I would like to see with *all* Restlet
 extensions: it would be nice for users to be able select which extensions
 they want to use, rather than configure it solely via the classpath.

 Possibly with Java properties? I can imagine every extension class having
 an enabled property.

  Thanks Tal, this looks great. We might want to add parameters to
  disable/enable the client/server connector from the extension as a second
  step to allow mixing of several connector extensions.
 
  I've added a note about this to the matching ticket:
  https://github.com/restlet/restlet-framework-java/issues/512

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3069272


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

Re: Re: Re: Re: Jetty 9?

2013-11-25 Thread Jerome Louvel
Thanks Tal, this looks great. We might want to add parameters to
disable/enable the client/server connector from the extension as a second
step to allow mixing of several connector extensions.

I've added a note about this to the matching ticket:
https://github.com/restlet/restlet-framework-java/issues/512

Jerome



2013/11/22 Tal Liron tal.li...@threecrickets.com

 I went ahead and also added a Jetty 9 client connector:

 https://github.com/tliron/restlet-jetty9

 Note that if you add the Jar to your classpath, both the server and client
 connectors will be activated.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3069061


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

Restlet gets funding to accelerate APISpark growth!

2013-11-13 Thread Jerome Louvel
Hi all,

Finally, we can share those news:
http://blog.restlet.com/2013/11/13/restlet-gets-funding-to-accelerate-apispark-growth/

From an open source point of view, this will give us extra resources to
move the RD on the framework forward. In the short term, Thierry Boileau
will dedicate fixed time every week to complete version 2.2 and start
working on the 3.0 milestone.

Their is also a great synergy with APISpark which is fully built on top of
the Restlet Framework and lets you export your web APIs as Restlet
Framework source code, to prevent lock-in.

As this is a usual concern in such events, no change in our open source
licensing scheme is expected following this funds raising :)

Best regards,
Jerome

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

Re: Unable to download org.restlet.ext.json, org.restlet version 2.0-M3 from Restlet Respository - parent pom verions 1.2 which is not available

2013-11-13 Thread Jerome Louvel
Did you add the Restlet Maven repository to your config?
http://restlet.org/download/maven

Looking at this POM, it seems fine:
http://maven.restlet.org/org/restlet/jee/org.restlet.ext.json/2.2-M3/

Jerome



2013/11/13 krishnamraju penumatsa kpenuma...@temenos.com

 Subject : Unable to download *org.restlet.ext.json*, org.restlet
 version
 2.0-M3 from Rest-let Repository which are internally pointing to parent POM
 versions 1.2 which is not available

 I am using below jar file version 2.0-M3, unable to download from Maven as
 these internally pointing to parent pom versions 1.2 which is not available

 We need this ASAP, please someone provide me the information when this will
 be fixed.

 groupId : org.restlet artifactId : org.restlet.ext.json version : 2.0-M3
 groupId : org.restlet artifactId : org.restlet version : 2.0-M3

 Below is the POM and Maven install log.

 POM
 ===
   dependency
 groupIdorg.restlet/groupId
 artifactIdorg.restlet.ext.json/artifactId
 version2.0-M3/version
   /dependency
   dependency
 groupIdorg.restlet/groupId
 artifactIdorg.restlet/artifactId
 version2.0-M3/version
   /dependency
 Maven Install Log
 =

 Downloading:

 http://maven.oams.com/content/groups/all/org/restlet/org.restlet.parent/1.2-SNAPSHOT/maven-metadata.xml
 Downloading:

 http://maven.oams.com/content/groups/all/org/restlet/org.restlet.parent/1.2-SNAPSHOT/org.restlet.parent-1.2-SNAPSHOT.pom
 [INFO]
 
 [INFO] BUILD FAILURE

 Cause
 =
 Above parent POM org.restlet.parent-1.2-SNAPSHOT.pom is not available.





 --
 View this message in context:
 http://restlet-discuss.1400322.n2.nabble.com/Unable-to-download-org-restlet-ext-json-org-restlet-version-2-0-M3-from-Restlet-Respository-parent-pe-tp7578961.html
 Sent from the Restlet Discuss mailing list archive at Nabble.com.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3068401


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

Re: Re: Re: Jetty 9?

2013-11-11 Thread Jerome Louvel
It looks good, thanks Tal!

Jerome


2013/11/9 Tal Liron tal.li...@threecrickets.com

 Binaries and API documentation are now available via the GitHub project
 site.

 Enjoy!

  https://github.com/tliron/restlet-jetty9

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3068157


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

Re: Re: Jetty 9?

2013-11-07 Thread Jerome Louvel
I suggest that you create a new
/restlet-framework-java/master/incubator/org.restlet.ext.jetty9 extension
by copying then adapting the o.r.e.jetty extension.

You can always have you own branch in GitHub and then merge it back when
master becomes ready for RF 3.0 (Java 7), but from a licensing point of
view you can't offer all the available open source licenses and would need
to pick one (I suggest Apache license).

Best regards,
Jerome



2013/11/6 Tal Liron tal.li...@threecrickets.com

 The API has indeed subtly changed, so that throwing in the Jars will not
 work. And though Restlet doesn't use AJP to communicate with Jetty, it does
 try to initialize AJP support, and those classes no longer exist in Jetty
 9, thus another kind of failure. Bottom line, it won't work.

 Jerome, Jetty 9 is an important feature for me, but I understand that it
 would be difficult to include this support in the Restlet main code base,
 because it would indeed require JVM 7 to compile. What is your opinion
 about me forking and hosting a jetty9 extension separately from the
 Restlet tree? I would be happy to keep the same multiple licenses. And
 eventually, when Restlet becomes ready for JVM 7, it could be merged into
 the main tree.

 Another idea is to create yet another repository within Restlet for
 contrib extensions from the community. They could be included in the
 Restlet distribution, each with its own documentation and possible quirks,
 clearly demarcated from the core extensions.

 -Tal

  Restlet integration with Jetty (the org.restlet.ext.jetty extension)
 isn't
  based on AJP but on core Jetty APIs, enable support of HTTP/HTTPS and
 AJP.
 
  I haven't tried but dropping new Jetty JARs might just do it, but likely
  they have changed their internal API here and there and some patches will
  be required. Anyone want to have a look?
 
  The main issue I see for Jetty 9 in RF 2.2 is their requirement on Java
  7... It seems like the official support should come instead in RF 3.0.
 
  Jerome
 
 
 
 
  2013/11/6 Bryan Hunt bhunt at mac dot com
 
   You can always use the servlet extension with Jetty.
  
   Bryan
  
  
   On Nov 06, 2013, at 08:45 AM, Tal Liron tal dot liron at
 threecrickets dot com
   wrote:
  
   The answer, unfortunately, is no: Restlet uses AJP to connect to Jetty,
   which is unfortunate because it's not a recommended protocol, and has
 been
   dropped in Jetty 9.
  
   Would it be possible to change the Jetty connector so that it would
 work
   with either Jetty 8 or 9? It's very unfortunate that Restlet is always
   behind on the latest releases of Jetty,
  
   --
  
  
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3067981
  
  

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3068043


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

Re: Re: Re: Jetty 9?

2013-11-07 Thread Jerome Louvel
That's fine Tal, whatever works best for you. Merging by hand won't be a
big issue anyway.

You might want to enter an issue in RF repo to let people discover this
support and let us communicate over it.

Best regards,
Jerome


2013/11/7 Tal Liron tal.li...@threecrickets.com

 Thanks, Jerome.

 I picked the Apache License 2.0, and am hosting it as a separate project.
 I'm assigning joint copyright on it to Restlet S.A.S, per the contributor
 agreement, so you are free to merge it should you ever wish to do so:

 https://github.com/tliron/restlet-jetty9

 Rather than a branch, it's its own tiny repository. I know you've made
 many efforts to make things easier for contributers, but alas it's still
 too cumbersome for me. The Restlet repository is enormous and unwieldy, and
 in fact I haven't been able to build it at all. It's just too much effort
 over no clear gain to be part of the incubator at this point. Maven
 builds, especially, make it trivial to use the Restlet binaries without
 having to be part of the git tree. Just treat the project as an incubator
 if you like!


  I suggest that you create a new
  /restlet-framework-java/master/incubator/org.restlet.ext.jetty9 extension
  by copying then adapting the o.r.e.jetty extension.
 
  You can always have you own branch in GitHub and then merge it back when
  master becomes ready for RF 3.0 (Java 7), but from a licensing point of
  view you can't offer all the available open source licenses and would
 need
  to pick one (I suggest Apache license).
 
  Best regards,
  Jerome

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3068100


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

Re: Jetty 9?

2013-11-06 Thread Jerome Louvel
Restlet integration with Jetty (the org.restlet.ext.jetty extension) isn't
based on AJP but on core Jetty APIs, enable support of HTTP/HTTPS and AJP.

I haven't tried but dropping new Jetty JARs might just do it, but likely
they have changed their internal API here and there and some patches will
be required. Anyone want to have a look?

The main issue I see for Jetty 9 in RF 2.2 is their requirement on Java
7... It seems like the official support should come instead in RF 3.0.

Jerome




2013/11/6 Bryan Hunt bh...@mac.com

 You can always use the servlet extension with Jetty.

 Bryan


 On Nov 06, 2013, at 08:45 AM, Tal Liron tal.li...@threecrickets.com
 wrote:

 The answer, unfortunately, is no: Restlet uses AJP to connect to Jetty,
 which is unfortunate because it's not a recommended protocol, and has been
 dropped in Jetty 9.

 Would it be possible to change the Jetty connector so that it would work
 with either Jetty 8 or 9? It's very unfortunate that Restlet is always
 behind on the latest releases of Jetty,

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3067981



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

Re: Re: MediaType: should application/xml be compatible with application/*+xml?

2013-11-06 Thread Jerome Louvel
Hi Andy :)

Yes, this should be the case. Did you try to set the ignoreParameters
option on the includes() method?

Jérôme



2013/11/5 Andy Dennie tig...@adennie.e4ward.com

 4 1/2 years later, I have a follow-up question :-)

 shouldn't
 application/json
 include
 application/vnd.foo.bar-baz-v1+json; level=3
 ?

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3067938


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

Re: Automation of web services

2013-10-22 Thread Jerome Louvel
Hello,

It seems that you are looking for APISpark :) APISpark is a cloud platform
developped by Restlet which contains a feature to export a JDBC database
(and other data sources) as a web API.
http://apispark.org/tutorials/jdbc

The generated web API can then be hosted and used directly from APISpark,
but you can also export the generated source code (based on Restlet
Framework) if needed. We plan to provide more deployment options in the
future. See additional details here:
http://blog.restlet.com/2013/09/23/apispark-integrates-with-existing-data-stores/

Note that we are still in private beta at this stage, so any feed-back is
appreciated. For those who want access to the private beta, just send me a
email at jlou...@restlet.com
http://apispark.com/

Best regards,
Jerome



2013/10/22 bhushan sonwanawane coolbhush...@gmail.com

 Hello All,

  I would like to create automation of web services
 .
 I want user only give details of database , table name and filters . Then
 it
 should automatically create web service which will output  url serving json
 array of reult which will be consumed by client . Is it possible with
 reslet. or with any other approach.


 Any help is appriciated.


 Thanks



 --
 View this message in context:
 http://restlet-discuss.1400322.n2.nabble.com/Automation-of-web-services-tp7578934.html
 Sent from the Restlet Discuss mailing list archive at Nabble.com.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3066845


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

Re: Restlet 2.2

2013-10-13 Thread Jerome Louvel
Hi Tal,

The current plan is to release 2.2.0 in January 2014, when leaving the
public beta phase of APISpark, ensuring a long enough stabilization period.

I'd like to reach a 2.2 RC1 next month. Next step is to update the public
RF road map document.

Best regards,
Jerome



2013/10/11 Tal Liron tal.li...@threecrickets.com

 Any idea or plan on when 2.2 will be released?

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3066202


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

Re: Apparently-random UnknownHostException while attempting POST operation

2013-09-25 Thread Jerome Louvel
Thanks Robert for sharing your solution to this issue!

Best regards,
Jerome


2013/9/25 Robert Dodier robert.dod...@gmail.com

 Problem solved, I hope -- apparently IPv6 causes trouble for the Java VM
 -- this is a bug in Java, but a workaround is to put
 -Djava.net.preferIPv4Stack=true on the Java command line. It seems to have
 made the UnknownHostException go away, so I am happy!

 Others have bumped into this bug; see:

 http://stackoverflow.com/questions/1608503/domain-name-resolution-not-working-in-java-applications-on-ubuntu64-9-04-machine

 and also:
 http://www-01.ibm.com/support/docview.wss?uid=nas8N1011363

 Hope this helps,

 Robert Dodier

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3065253


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

Re: ConverterService is swallowing exceptions

2013-09-22 Thread Jerome Louvel
Hi Alex,

Which version of RF are you using?

In v2.2 at least, ConverterService.toObject(..) does let exceptions bubble
up.

Best regards,
Jerome



2013/9/20 Alex Zuroff alex.zur...@ejgallo.com

 I would like to be able to return a custom Status
 (CLIENT_ERROR_UNPROCESSABLE_ENTITY) and error message (Field XXX is
 missing, for example) if my deserializer detects a problem when converting
 the request payload into an object (and throws an exception within the
 deserialize() method).

 The problem is that the ConverterService.toObject() method simply logs the
 exception and doesn't pass it along.  The StatusService only sees a generic
 ResourceException with a 415 (Unsupported Media Type) status - the original
 exception is lost.

 Is there any way to get the ConverterService to preserve the original
 deserailization exception so the StatusService can do something useful with
 it?

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3064952


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

Restlet Framework 2.1.4 and 2.2 M5 released (security fixes)

2013-09-18 Thread Jerome Louvel
Hi all,

We are announcing two new versions of Restlet Framework, including some
security fixes:
http://blog.restlet.com/2013/09/18/restlet-framework-2-1-4-and-2-2-m5-released/

Please make sure you upgrade your deployed Restlet applications. If you are
still on 2.0 or older, you should seriously consider upgrading as those
versions are now supported and don't get security patches.

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel

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

Re: multiple servlet mappings to 1 RestletServlet

2013-09-05 Thread Jerome Louvel
Hi Stephen,

You should be able to create multiple servlets using the same
RestletServlet class and different servlet names.

Does that work?
Jerome



2013/9/5 Stephen More stephen.m...@gmail.com

 Is there a way to have restlet respond to multiple servlet mappings ?
 Right now it looks like it will bind to which ever one is hit first by
 a request.

 In my servlet container paths beginning with /ad are protected by an LDAP
 realm.
 paths beginning with /db are protected by a database realm.

 I am trying to make all restlet calls available to both realms LDAP
 and database:

 Here is an example from web.xml
 context-param
 param-nameorg.restlet.application/param-name
 param-valuecom.example.RestApplication/param-value
 /context-param

 servlet
 servlet-nameRestletServlet/servlet-name

 servlet-classorg.restlet.ext.servlet.ServerServlet/servlet-class
 /servlet

 servlet-mapping
 servlet-nameRestletServlet/servlet-name
 url-pattern/ad/rest/*/url-pattern
 /servlet-mapping

 servlet-mapping
 servlet-nameRestletServlet/servlet-name
 url-pattern/db/rest/*/url-pattern
 /servlet-mapping


 -Thanks

 Stephen More

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3064019


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

Next NYC Web API meetup

2013-08-09 Thread Jerome Louvel
Hi all,

For those in the NYC area, there is an upcoming Web API meetup that will be
discussing the Web API architecture style proposition that I made in a
recent blog post.

Thanks to Avi Flax to continuing the conversation. Registration for the
14th of August is here:
http://www.meetup.com/NYC-API-Group/events/129004952/

I'm looking forward to getting additional feed-back and contributions to
this project:
https://github.com/restlet/web-api-style

Best regards,
Jerome

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

Re: vert.x

2013-06-20 Thread Jerome Louvel
Hi Pieter,

As long as it brings value compared to the existing Jetty and Simple
connectors, in term of scalability and throughput for example, then it
definitely makes sense.

The issue with extension is that they need to be documented and maintained
on the long run, so it needs to really make a difference :)

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel




2013/6/20 Pieter Martin pietermar...@lavabit.com

 Hi,

 Is a http connector for using restlet inside http://vertx.io/ something
 that would be considered?

 Thanks
 Pieter

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3058658


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

Re: endless Too many open files exceptions

2013-06-19 Thread Jerome Louvel
Hi Marc,

One constraint for the internal connector is for it to have zero dependency
to be part of org.restlet.jar.

Maybe we should consider a Rupy extension instead?

Otherwise, any help on debugging the remaining issues in Restlet internal
connector would be greatly appreciated.

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel






2013/6/19 Marc Larue m...@rupy.se

 Hi Jerome,

 I would recommend that you look at http://rupy.googlecode.com as internal
 HTTP engine. It's now stable in release 1.0.

 Kind Regards,

 /marc

 On Tue, 14 May 2013, Jerome Louvel wrote:

  Hi Robert,
  You should try to use the Jetty or Simple connector extensions instead,
 they
  are more stable at this point.
 
  Best regards,
  Jerome
  --
  http://restlet.org
  http://twitter.com/#!/jlouvel
 
 
 
 
  2013/5/14 Robert Dodier robert.dod...@gmail.com
Hi,
 
I am working with Restlet 2.1.2, using both client and server
code as parts of a larger applications.
 
After working correctly for some time (maybe days),
a GET request causes an endless succession of
Too many open files exceptions. As it happens,
those are being written into a log file (by nohup) and
eventually exhaust all available disk space -- it appears
the exceptions just keep pouring out, one after another.
Maybe the failed connection is retried immediately, so that
fails again with the same error? Just guessing. I looked at
the source code but I can't tell what's going on.
 
Here is one such exception. The message is printed by
ServerConnectionController.onSelected.
 
  Unexpected error while accepting new connection
 
  java.io.IOException: Too many open files
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native
Method)
 
 atsun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:163)
 
 
 atorg.restlet.engine.connector.ServerConnectionController.onSelected(ServerCo
nnectionController.java:103)
 
 atorg.restlet.engine.connector.ConnectionController.selectKeys(ConnectionCont
roller.java:308)
 
 atorg.restlet.engine.connector.ConnectionController.doRun(ConnectionControlle
r.java:171)
at
org.restlet.engine.connector.Controller.run(Controller.java:159)
at
 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at
java.util.concurrent.FutureTask.run(FutureTask.java:166)
 
 atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1
110)
 
 atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
603)
at java.lang.Thread.run(Thread.java:679)
 
(Yes, maybe I could rework the logging configuration so
that it would only fill up a certain amount and then rotate
the log file. That doesn't address the underlying problem.)
 
It might (or might not) be the case that the error occurs
after a long time in which there are no requests -- i.e.
that it happens on the first request after a long pause.
Not sure about that.
 
Has anyone seen such a problem? Yes, it would really
help if I could narrow down the problem in time  space.
Yes, I certainly want to do that, and I have not yet
succeeded at it.
 
Host OS is RedHat Enterprise Linux 6.
java -version says:
 
  java version 1.6.0_24
  OpenJDK Runtime Environment (IcedTea6 1.11.3)
(rhel-1.48.1.11.3.el6_2-x86_64)
  OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
 
Thanks for any light you can shed on this problem.
 
Robert Dodier
 
--
 
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3055
447
 
 
 
 

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3058519

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

Re: Re: How to server a video file

2013-06-16 Thread Jerome Louvel
Hi Boris,

Overriding doInit() method is easier as you don't need to make the
super.init() call and in addition if anything goes wrong, the doCatch()
will be invoked.

Regarding the broken pipe, I'm wondering it this isn't due to the ranged
request. Have you tried a straight/non-ranged HTTP call from curl or
another HTTP client?

The idea to prevent direct access to header is not really to be more
general than HTTP, but rather to expose HTTP semantics as a Java API. This
is an aspect we might reconsider, especially for extension headers.

Best regards,
Jerome



2013/6/15 Borislav Iordanov bo...@miamidade.gov

 Hi Jerome,

 Thanks a lot for your reply, replacing the handle() method by an
 implementation of get() yielded a NullPointerException in the
 ServerResource.handle implementation. It turned out it was because I'm also
 overriding the 'init' method in order to get to the request and response
 objects, as I read somewhere in the docs that I should do. Commenting out
 my overriding of init or calling super.init solved the NPE. I also read
 somewhere on the restlet website that to intercept init, I can override
 doInit which I didn't do because I didn't want to intercept anything. I
 only want to get a reference to me request and response objects.

 The broken pipe exception remains. The client is Chrome Version
 27.0.1453.110 on Ubuntu, as I mentioned via an HTML embed tag generally
 used for videos. Here is the info that get be gather from Chrome dev tools
 for that particular request. Note that I did try setting the Content-Length
 header explicitly.

 Request URL:http://localhost:8182/show
 Request Method:GET
 Status Code:206 Partial Content
 Request Headersview source
 Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
 Accept-Encoding:gzip,deflate,sdch
 Accept-Language:en-US,en;q=0.8
 Connection:keep-alive
 Cookie:__atuvc=12%7C5%2C0%7C6%2C0%7C7%2C0%7C8%2C2%7C9;
 vctk=1e66b965-3619-403f-b22a-2281faed2977;
 user=20657493-763c-4109-805d-48de04f4317d
 Host:localhost:8182
 If-Range:Wed, 17 Apr 2013 04:35:52 GMT
 Range:bytes=120832-120832
 Referer:http://localhost:8182/
 User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
 Gecko) Chrome/27.0.1453.110 Safari/537.36
 Response Headers
 HTTP/1.1 206 Partial Content
 Content-Length: 1
 Content-Range: bytes 120832-120832/8973447
 Content-Type: video/mp4
 Last-Modified: Wed, 17 Apr 2013 04:35:52 GMT
 Date: Sat, 15 Jun 2013 17:38:56 GMT
 Accept-Ranges: bytes
 Server: Restlet-Framework/2.1.2

 Final note: it took my a while to find out how to add header to an HTTP
 response. I understand that Restlet aims to be more general than HTTP, but
 one has to assume HTTP is the overwhelming majority of use cases. I would
 suggest that a call to:

 HttpResponse.addHeader()

 should lead to a NullPointerException, but rather automatically create the
 header Series in the response if they are not there.

 Thanks again!
 Boris

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3058179


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

RE: How to tell which client connector library is being used

2013-06-10 Thread Jerome Louvel
Hi Robert,

It seems that you are missing the org.restlet.ext.httpclient.jar in the 
classpath which will actually support the Apache HTTP client library.

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel

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


Re: latest on push technology

2013-05-20 Thread Jerome Louvel
Hi Pieter,

Good question.

For 1) you might want to try implementing HTML5 Server-Side Event which
relies on streaming representations as well.
For 2) you should indeed try streaming representations. Some have
experienced issues with network buffering though, but it should work.

Another RESTful way moving forward will be to rely on HTTP/2.0 server-side
push
http://tools.ietf.org/html/draft-ietf-httpbis-http2-02#section-4.3

Otherwise, you will have to rely on another technology such as WebSockets
and integrate it with RF. Maybe there is space for a WebSockets extension
based on HTTP/2.0 semantics. It would probably require an evolution of
Restlet API though,

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel




2013/5/11 Pieter Martin pietermar...@lavabit.com

 Hi,

 What is the current recommended strategy with restlet to implement some
 form of a server side push in a browser environment.

 In our case we have 2 use cases for this.

 1) A standard publish/subscribe requirement for sending messages to the
 client.
 2) We need to simulate a server side ssh or telnet terminal session via
 the browser.

 For 2 I think it might be better and simpler to use restlet's current
 streaming representation support.

 BTW, really enjoying working with the restlet api.

 Thanks
 Pieter

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3055303


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

Re: endless Too many open files exceptions

2013-05-14 Thread Jerome Louvel
Hi Robert,

You should try to use the Jetty or Simple connector extensions instead,
they are more stable at this point.

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel




2013/5/14 Robert Dodier robert.dod...@gmail.com

 Hi,

 I am working with Restlet 2.1.2, using both client and server
 code as parts of a larger applications.

 After working correctly for some time (maybe days),
 a GET request causes an endless succession of
 Too many open files exceptions. As it happens,
 those are being written into a log file (by nohup) and
 eventually exhaust all available disk space -- it appears
 the exceptions just keep pouring out, one after another.
 Maybe the failed connection is retried immediately, so that
 fails again with the same error? Just guessing. I looked at
 the source code but I can't tell what's going on.

 Here is one such exception. The message is printed by
 ServerConnectionController.onSelected.

   Unexpected error while accepting new connection

   java.io.IOException: Too many open files
 at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
 at
 sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:163)
 at
 org.restlet.engine.connector.ServerConnectionController.onSelected(ServerConnectionController.java:103)
 at
 org.restlet.engine.connector.ConnectionController.selectKeys(ConnectionController.java:308)
 at
 org.restlet.engine.connector.ConnectionController.doRun(ConnectionController.java:171)
 at org.restlet.engine.connector.Controller.run(Controller.java:159)
 at
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 at
 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
 at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
 at java.lang.Thread.run(Thread.java:679)

 (Yes, maybe I could rework the logging configuration so
 that it would only fill up a certain amount and then rotate
 the log file. That doesn't address the underlying problem.)

 It might (or might not) be the case that the error occurs
 after a long time in which there are no requests -- i.e.
 that it happens on the first request after a long pause.
 Not sure about that.

 Has anyone seen such a problem? Yes, it would really
 help if I could narrow down the problem in time  space.
 Yes, I certainly want to do that, and I have not yet
 succeeded at it.

 Host OS is RedHat Enterprise Linux 6.
 java -version says:

   java version 1.6.0_24
   OpenJDK Runtime Environment (IcedTea6 1.11.3)
 (rhel-1.48.1.11.3.el6_2-x86_64)
   OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

 Thanks for any light you can shed on this problem.

 Robert Dodier

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3055447


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

Re: Android client - Restlet 2.0.15 - cannot connect with HTTPS/SSL - recoverable error 1001

2013-05-06 Thread Jerome Louvel
Hi Alex,

This is an issue with Restlet internal HTTP connector (for dev purpose only
at this point).

Could you try to add and register the org.restlet.ext.net.jar connector?

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel





2013/5/6 Alex alexdim...@yahoo.gr

 New update:

 I made a change on my domain's DNS, and as a result all calls towards my
 domain are forwarded to the elasticbeanstalk.com domain. This way, my
 certificate appears as valid to the client, since the calls go through the
 CNAME of the certificate.

 But unfortunately, /I'm still getting the 1001 error/. What the heck is
 going on? I don't even know how to debug this anymore, since I have no clue
 except the 1001 error.

 Anyone?



 --
 View this message in context:
 http://restlet-discuss.1400322.n2.nabble.com/Android-client-Restlet-2-0-15-cannot-connect-with-HTTPS-SSL-recoverable-error-1001-tp7578771p7578779.html
 Sent from the Restlet Discuss mailing list archive at Nabble.com.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3054976


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

Re: Android client - Restlet 2.0.15 - cannot connect with HTTPS/SSL - recoverable error 1001

2013-05-06 Thread Jerome Louvel
Alex;

You to put the connector in the first postion doing this:

Engine.getInstance().getRegisteredClients().add(*0, *new org.restlet.ext.net
.HttpClientHelper(null));

Best regards,
Jerome



2013/5/6 Alex alexdim...@yahoo.gr

 Hello Jerome,

 thanks a lot for responding.

 If gaving the org.restlet.ext.net.jar on your classpath is enough, then
 I've
 already done what you're suggesting. As I stated on my first post, I'm not
 using the internal http connector, but instead the apache httpclient.

 In any case, I've even explicitly created the ClientResource calling the
 external http connector
 (Engine.getInstance().getRegisteredClients().add(new
 org.restlet.ext.net.HttpClientHelper(null));), but I'm still getting the
 1001 error.



 --
 View this message in context:
 http://restlet-discuss.1400322.n2.nabble.com/Android-client-Restlet-2-0-15-cannot-connect-with-HTTPS-SSL-recoverable-error-1001-tp7578771p7578781.html
 Sent from the Restlet Discuss mailing list archive at Nabble.com.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3054979


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

Re: Android client - Restlet 2.0.15 - cannot connect with HTTPS/SSL - recoverable error 1001

2013-05-06 Thread Jerome Louvel
Have you tried to debug locally in Eclipse, using the Java SE edition? In
version 2.1 you should get additional debug information by looking at the
getResponse().getStatus() object. It should embed the underlying exception.

Otherwise, could you package a small project reproducing the issue? That
will be easier for us to debug.

Jerome


2013/5/6 Alex alexdim...@yahoo.gr

 This doesn't have the desired result either. :/

 br,
 Alex

 On 6 Μαϊ 2013, at 6:08 μ.μ., Jerome Louvel-3 [via Restlet Discuss] [hidden
 email] http://user/SendEmail.jtp?type=nodenode=7578783i=0 wrote:

 Alex;

 You to put the connector in the first postion doing this:

 Engine.getInstance().getRegisteredClients().add(*0, *new
 org.restlet.ext.net.HttpClientHelper(null));

 Best regards,
 Jerome



 2013/5/6 Alex a
 href=x-msg://616/user/SendEmail.jtp?type=nodeamp;node=7578782amp;i=0
 target=_top rel=nofollow link=external[hidden email]

 Hello Jerome,

 thanks a lot for responding.

 If gaving the org.restlet.ext.net.jar on your classpath is enough, then
 I've
 already done what you're suggesting. As I stated on my first post, I'm not
 using the internal http connector, but instead the apache httpclient.

 In any case, I've even explicitly created the ClientResource calling the
 external http connector
 (Engine.getInstance().getRegisteredClients().add(new
 org.restlet.ext.net.HttpClientHelper(null));), but I'm still getting the
 1001 error.



 --
 View this message in context:
 http://restlet-discuss.1400322.n2.nabble.com/Android-client-Restlet-2-0-15-cannot-connect-with-HTTPS-SSL-recoverable-error-1001-tp7578771p7578781.html
 Sent from the Restlet Discuss mailing list archive at Nabble.com.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3054979




 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://restlet-discuss.1400322.n2.nabble.com/Android-client-Restlet-2-0-15-cannot-connect-with-HTTPS-SSL-recoverable-error-1001-tp7578771p7578782.html
  To unsubscribe from Android client - Restlet 2.0.15 - cannot connect with
 HTTPS/SSL - recoverable error 1001, click here.
 NAMLhttp://restlet-discuss.1400322.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



 --
 View this message in context: Re: Android client - Restlet 2.0.15 -
 cannot connect with HTTPS/SSL - recoverable error 
 1001http://restlet-discuss.1400322.n2.nabble.com/Android-client-Restlet-2-0-15-cannot-connect-with-HTTPS-SSL-recoverable-error-1001-tp7578771p7578783.html

 Sent from the Restlet Discuss mailing list 
 archivehttp://restlet-discuss.1400322.n2.nabble.com/at Nabble.com.


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

Re: Android client - Restlet 2.0.15 - cannot connect with HTTPS/SSL - recoverable error 1001

2013-05-06 Thread Jerome Louvel
Thanks Alex for the follow-up, I'm sure it will help other users.

Cheers,
Jerome


2013/5/6 Alex alexdim...@yahoo.gr

 Ok, I found the root cause of the problem.
 It had nothing to do with Restlet or my code. It was all a matter of
 installing correctly the intermediate certificates on AWS. The certificate
 chain of my CA consists of 4 certificate files, and AWS needs this chain in
 a very specific order (signing certificate first, CA root certificate last,
 and all other certificates in between), given in a pem/text format.
 Unfortunately the AWS documentation is a mess, so I had to dig around and
 do some trial-and-error before making it work.

 Your suggestion about checking the getStatus() stack (and the 
 java.security.cert.CertPathValidatorException
 exception) of the response was the trigger that lead me to investigate
 and revise the way I installed my certs on AWS, so thanks for that. :)

 So I guess this matter is closed. Thanks for the support, I really
 appreciate it. :)
 Keep up the good work you're doing on Restlet.

 br,
 Alex

 --
 View this message in context: Re: Android client - Restlet 2.0.15 -
 cannot connect with HTTPS/SSL - recoverable error 
 1001http://restlet-discuss.1400322.n2.nabble.com/Android-client-Restlet-2-0-15-cannot-connect-with-HTTPS-SSL-recoverable-error-1001-tp7578771p7578786.html
 Sent from the Restlet Discuss mailing list 
 archivehttp://restlet-discuss.1400322.n2.nabble.com/at Nabble.com.


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

Re: How much REST should your web API get?

2013-05-03 Thread Jerome Louvel
Hi Adam,

Regarding Restlet Framework, its implies a resource-oriented design
(resources, URIs, representations) and proper usage of HTTP
application-level features (conneg, caching, conditional requests, etc.).

However it doesn't force interaction between clients and servers to go
through hypermedia even though we help with that via template engines, HTML
form parsing and so on.

We do already have support for machine-to-machine interactions in the form
of annotated Restlet interfaces which do involve a coordinated deployment
of clients and servers.

So concretely there won't be any fundamental change moving forward but
probably more support for machine-to-machine interactions around the Web
API style, which people have been looking for anyway for a long time (e.g.
how to document / version my API).

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel




2013/5/3 Adam Mc a...@cs.miami.edu

 Jerome, this was a good post and lots to think about.  I don't have any
 feed back right now, as much of the conversation was new material for me,
 but I tended to agree with what Hansson posted.

 Are you planing on moving Restlet towards more of the Web API style
 framework, as opposed to a streamlined REST framework?  I got that
 impression from your blog post that is what you might be thinking.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3054829


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

How much REST should your web API get?

2013-05-02 Thread Jerome Louvel
Hi all,

This is slightly off-topic but here is my new blog post, walking you from
hypermedia APIs to cross-device web sites and introducing a formal Web
API architecture style:
http://blog.restlet.com/2013/05/02/how-much-rest-should-your-web-api-get/

Please share your thoughts and help us spread the word, this will help
Restlet Framework!

Best regards,
Jerome

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

Re: Re: Communication Error (1001) - The connector failed to complete the communication with the server

2013-04-30 Thread Jerome Louvel
Hi David and Adam,

Thanks for the follow up and general comment on the list. I agree and also
suggest people to follow StackOverflow for general QA. We try to be
present over there as well, but this list will stay the place of more
personal conversations.

After the release of the 'Restlet in Action' book last September, the core
Restlet team (Thierry Boileau, Thierry Templier and myself) has been very
much involved in the development and launch of our new APISpark cloud
platform (aka Restlet as a Service): http://apispark.com/ As a result, we
had less bandwidth to timely reply in this list and move version 2.2
forward.

We also launched the new http://restlet.org web site which was a major
undertaking and still requires work on the content front.

There is an opportunity for community members to step up and contribute to
the project. I'd like to highlight Tim Peierls who has been very active in
this regard for months. We need other interested person to be involved as
well.

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel





2013/4/30 Adam Mc a...@cs.miami.edu

 Hi David,

 Everything is working well now for me now and I like restlet, but there
 does not seem to be much activity on this list.

 I kind of feel the same way.  Restlet matches my needs pretty well, and
 thing have been going well so far.  But, it is too bad that their is not a
 bigger community and forum here.

 I wonder if in general StackOverFlow is a better place to post questions
 and comments?

 -Adam

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3054610


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

Re: Evaluating Restlet - few questions

2013-04-24 Thread Jerome Louvel
Hi Adam,

Thanks for reaching us and your interest in Restlet :)

[1] The Jetty connector is production ready and much lighter than a full
Servlet container.

[2] It is still a work in progress. Not sure to get this ready for RF 2.2
at this point. We need help on the documentation front mostly as most of
the code has already been upgraded to the OAuth 2.0 final RFC.

[3] Yes, it is possible using the callback mechanism. See this method:
http://restlet.org/learn/javadocs/snapshot/jee/api/org/restlet/resource/ClientResource.html#setOnResponse(org.restlet.Uniform)

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel




2013/4/8 Adam Mc a...@cs.miami.edu

 This is my fist message on the restlet discussion.  First, I just want to
 say thanks to the developers of Restlet.  It seems like a great api and
 framework.  We are evaluating Restlet, and we have a few general questions.
  I apologize  if the questions are a bit diverse, but I thought I would
 just send them in one message.

 [1]  Jetty Connector vs Servlet Container:  We would like to use the Jetty
 connector  as a standalone outside of a servlet container.  Is Restlet
 standalone with Jetty as stable as using a servlet, or is a servlet
 container preferred for production?

 [2] The book mentions that Oauth 2.0 is in draft.  Is Oauth 2.0 nearing
 production code?  Not rushing, just wondering?

 [3]  Is there any way to handle Ascynhrous Client requests.  Considering
 that our webserver is also a client to other servers, the client needs to
 consume other restful services.  Is there anyway to consume services in a
 non blocking or ascyh manner, so as to not keep the threads blocking.  If
 so, can someone point me into the direction of code example.

 Thanks,

 -Adam

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3052727


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

Re: Setiting media type for webm videos

2013-04-22 Thread Jerome Louvel
Hi Adam,

To simplify your code, you could just do this in your application's
constructor:

getMetadataService().addExtension(webm, MediaType.valueOf(video/webm));

Then, check the response media type with a raw HTTP client to make sure it
is properly set. If it still doesn't work, it might not be Restlet related.

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel





2013/4/22 Adam Mc a...@cs.miami.edu

 Hi,

 I am trying to get HTML5 *.webm videos to play from a restlet server.  I
 am using the latest stable with Jetty standalone with the FILE protocol on
 a directory.  Other types of HTML5 videos play fine, but not webm videos,
 so I suppose it is a meida type problem.

 Looking at my old tomcat setup (videos played fine under tomcat), I see
 the following:

 mime-mapping
extensionwebm/extension
mime-typevideo/webm/mime-type
 /mime-mapping

 So, I tried to translate this to restlet with the following code, but it
 is still not working.  Any ideas?

 public synchronized Restlet createInboundRoot() {
MetadataService ms = new MetadataService();
ms.addCommonExtensions();
ms.addExtension(webm, new MediaType(video/webm));
ms.setEnabled(true);
this.setMetadataService(ms);

   Router router = new Router(getContext());
   // route codes here
return router;
 }

 Thanks,
 -Adam

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3053895


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

Re: Communication Error (1001) - The connector failed to complete the communication with the server

2013-04-22 Thread Jerome Louvel
Hi David,

Please plugin the org.restlet.ext.net.jar to replace the default connector
with a more stable one. It will probably help.

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel




2013/4/21 David Leangen j...@leangen.net


 Hello!

 After a few weeks of absence, I am trying once again to set up restlet in
 my OSGi environment. Using version 2.2-M1.

 I am making a call like this:

 final Client client = new Client( new Context(), Protocol.
 HTTPS );
 final ClientResource clientResource = new ClientResource( url
  );
 clientResource.setNext( client );
 final ChallengeResponse authentication = newChallengeResponse( 
 ChallengeScheme.
 HTTP_BASIC, pwd,  );
 clientResource.setChallengeResponse( authentication );
 final Representation r = clientResource.get();
 r.write( System.out );
 r.release();
 client.stop();

 Sometimes I get back a valid reply, but most times I get back this error:

 Communication Error (1001) - The connector failed to complete the
 communication with the server

 What confuses me is why this would work sometimes, but not others. Any
 hints?

 Best regards,
 =David




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

Re: Re: redirect with get from post

2013-04-17 Thread Jerome Louvel
Hi Adam,

Thanks for the cool feed-back on RF!

As far as I know, HTTP redirection doesn't let you explicitely specify the
HTTP method to use for the target URI.

Looking more closely at the HTTP redirection statuses:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3

it does appear that status code 303 (and potentially 302) do change the
method from POST to GET automatically! It should therefore work with RF as
expected.

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel



2013/4/17 Adam Mc a...@cs.miami.edu

 Jerome,

 thanks for your reply.  Yes, I was not aware of the html redirect, as I
 have always used server side.  I suppose that would work, but it does seem
 that serverside is a more recommended method.

 My pattern is that an HTML FORM submits a POST, and depending on the
 circumstance, issues a redirect.  This pattern always worked fine using
 servlets. Switching to Restlet caused a bit of a problem in this area as it
 was forcing a POST redirect.

 Too bad we can't designate the redirect method.  Is there something in
 REST or HTTP that dictates against changing methods on a redirect?

 Regardless, I have found Restlets to be a great framework and I am
 currently in the process of switching some major code base over to the
 framework.

 Thanks again,
 -Adam

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3053474


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

Re: Restlet web sites are down for maintenance

2013-04-16 Thread Jerome Louvel
Hi all,

Here is an update following the server failure we had back in January:

   - The Maven repository http://maven.restlet.org/ has been fully
   restored
  - we will work next of synchronizing it with the central repository
  - thanks to Tamas Caservenak from Sonatype for his recent help with
  this!

  - All the documentation has been migrated to GitHub
  - see https://github.com/restlet/restlet-sites
  - content is regularly published as static pages on http://restlet.org
  - see the version combo box and Edit button leading to GitHub for
  easier contributions
 - tutorial: http://restlet.org/learn/tutorial/2.2/
 - user guide: http://restlet.org/learn/guide/2.2/

Our focus now is going on the documentation material available and the
preparation of version 2.2.

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel




2013/1/28 Tim Peierls t...@peierls.net

 On Mon, Jan 28, 2013 at 9:39 AM, Jerome Louvel jlou...@restlet.comwrote:


- Daisy wiki is being migrated to GitHub
   - we generate static HTML pages on http://restlet.org instead
   - easier to maintain via GitHub MarkDown files
   - easier to contribute via GitHub Pull Requests

 That's great to hear!

 --tim


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

Re: redirect with get from post

2013-04-15 Thread Jerome Louvel
Hi Adam,

I guess you could use an HTML redirect in this case, if your client is
ineed a web browser.

Best regards,
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel



2013/4/14 Adam Mc a...@cs.miami.edu

 Hi,

 I have a post request, and after that request I need to temporarily
 redirect to another page.  However, I need that redirect to be a GET not a
 POST.  I see in the docs that the redirect uses the same method, which in
 this case is a POST.  Is there any way to change the method being used to a
 GET?

 Thanks,
 -Adam

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3053244


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

Re: Set StatusService on Application or Component?

2013-04-02 Thread Jerome Louvel
Hi Arjohn,

The StatusService has two complementary purposes:

   - setting an HTTP status based on a Jave exception
   - setting a response entity in case of on error status

For the second purpose, the Component level StatusService is capable of
overwriting the response entity in case of error if:

   - no error entity has been set
   - the overwriting property is set to 'true'

In order to get consistent error handling across across multiple
applications, you can also try to disable the Application level
StatusServices, even though in this case the Java exception to Status
conversion will still occurs, not the response entity addition.

Hope this clarifies.

Thanks,
Jerome
--
http://restlet.com
http://twitter.com/#!/jlouvel




2013/4/2 Arjohn Kampman arjohn.kamp...@vound-software.com

 Hi all,

 According the the javadoc for StatusService, one should be able to set
 it on either the Application or the Component. However, in our case,
 only the former works. A quick peek at the restlet code shows that
 Resource.getStatusService() only calls Application.getStatusService().
 Is this an error in the javadoc, or is something wrong with our code?
 We're using restlet 2.1.1.

 Regards,
 Arjohn Kampman

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3052374


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

Nice third-party Restlet 2.1 tutorial

2013-03-26 Thread Jerome Louvel
Hi all,

I'd like to point out this nice tutorial for Restlet Framework 2.1 by
James Sumners:
https://bitbucket.org/jsumners/restlet-2.1-demo

He is looking for feed-back to improve it.

Thanks,
Jerome
--
http://restlet.com
http://twitter.com/#!/jlouvel

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


Migration of Restlet wiki

2013-03-20 Thread Jerome Louvel
Hi all,

For the launch of the new restlet.org web site, we have migrated the
content of the old Restlet wiki to GitHub, with a static HTML publication:
http://restlet.org/learn/guide

Be aware that the content has many links and embedded images that need to
be updated/fixed.

For those who want to help us, you can edit those MarkDown pages on GitHub
and submit pull requests:
https://github.com/restlet/restlet-sites/tree/master/modules/org.restlet/learn/guide

To replace the Daisy comments system, we are also integrating
http://disqus.com/ at the bottom of pages.

Let us know if you have any idea/suggestion!

Thanks,
Jerome
--
http://restlet.com
http://twitter.com/#!/jlouvel

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

Re: OAuth 2 Password Authentication

2013-03-19 Thread Jerome Louvel
Hi Umoh,

We have a doc gap on this front that we intend to fill for RF 2.2 release.

Meanwhile, I suggest that you look at the GitHub related tickets for info
on the latest activity on the OAuth extension:
https://github.com/restlet/restlet-framework-java/issues/search?q=oauth

Thanks,
Jerome


2013/3/18 Umoh Bassey-Duke umohd...@gmail.com

 Hi,

 I'm new to Restlet and i'm trying to figure out how to setup  OAuth 2. So
 far I haven't been able to find any documentation to assist me. Can anyone
 point me to any relevant documentation, or pointers on how I can do this in
 Restlet. thanks

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3051321


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

Restlet Framework 2.1.2 and 2.2 M3 released (+ new web site)

2013-03-08 Thread Jerome Louvel
Hi all,

We are happy to release two new versions of Restlet Framework... along
with our new project web site!
http://blog.restlet.com/2013/03/08/restlet-framework-2-1-2-and-2-2-m3-released/

Let us know what you think!
Jerome
--
http://restlet.org
http://twitter.com/#!/jlouvel

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


Re: RESTlet + JSON performance flip at ~1024/1025 byte payload?

2013-02-21 Thread Jerome Louvel
Hi Daniel,

Thanks for reporting those result in a reproducible way.

Which HTTP connector are you using exactly? The default on in
org.restlet.jar or the Simple/Jetty extensions?

Thanks,
Jerome
--
http://restlet.com
http://twitter.com/#!/jlouvel





2013/2/15 Daniel Halperin dhalp...@cs.washington.edu

 Hi everyone,

 Just a note that I created a clean, minimal test example here:
 https://github.com/dhalperi/restlet-testing

 Thanks,
 Dan


 On Fri, Feb 15, 2013 at 10:20 AM, Daniel Halperin 
 dhalp...@cs.washington.edu wrote:

 Hi everyone,

 I'm having some crazy timing properties related to RESTlet responses
 being above or below 1024 bytes. The fact that this is a power of 2 makes
 me think it's no coincidence!

 [To start, here is some setup text copied from my previous mail.]
 I'm just getting started with RESTlet (v.2.1.1, with
 org.restlet.jee.ext.jackson  jee.ext.jaxrs), so I may be doing something
 very wrong. However, basic things work well for me. For instance, if I
 return POJOs from a function annotated with
 @Produces(MediaType.APPLICATION_JSON), they seem to be returned properly.

 Right now, I'm experimenting with implementing different handlers for
 different Content-Types. I started with the simplest possible: echo JSON
 input (converted to String) back as JSON:

 /**
  * Class that handles queries.
  *
  * @author dhalperi
  */
 @Path(/echo)
 public final class EchoResource {
   /**
* For now, simply echoes back its input.
*
* @param input the payload of the POST request itself.
* @return the payload.
*/
   @POST
   @Produces(MediaType.APPLICATION_JSON)
   @Consumes(MediaType.APPLICATION_JSON)
   public String postNewQuery(final String input) {
 return input;
   }
 }
 [/copied text]

 I just found a new, very strange effect. It seems that if the payload
 returned by this function is = 1024 bytes, the processing time is
 near-imperceptible; a few hundred ms at most. But when it goes to 1025
 bytes, it seems to take just about 1.06s or just about 2.04s to process.
 Also, there's almost no variation from those two numbers.

 I send json (and time the processing) like this: time curl -i -XPOST
 localhost:8753/echo -H Content-type: application/json -d
 @./single_join.json

 Here are the contents of single_join.json

 % cat single_join.json
 {
   raw_datalog : testRelationJoin(x,y,y,z) :-
 testRelation(x,y),testRelation(y,z).,
   logical_ra : INSERT(JOIN(SCAN1,SCAN2)),
   query_plan : {
 1 : [[
 {
   op_name : SCAN1,
   op_type : SQLiteScan,
   arg_user_name : test,
   arg_program_name : test,
   arg_relation_name : testRelation
 },

 {
   op_name : SCAN2,
   op_type : SQLiteScan,
   arg_user_name : test,
   arg_program_name : test,
   arg_relation_name : testRelation
 },

 {
   op_name : JOIN,
   op_type : LocalJoin,
   arg_child1 : SCAN1,
   arg_columns1 : [1],
   arg_child2 : SCAN2,
   arg_columns2 : [0],
   arg_select1 : [0],
   arg_select2 : [1]
 },

 {
   op_name : INSERT,
   op_type : SQLiteInsert,
   arg_child : JOIN,
   arg_user_name : test,
   arg_program_name : test,
   arg_relation_name : testRelationJoin,
   arg_overwrite_table : true
 }
   ]]
   }
 }

 if I add another section, say by copying the JOIN map again, the (long)
 timing does not change at all. If I remove a section, say by deleting the
 JOIN, it returns instantaneously. This happens independent of what I
 remove, so it does not appear to be data-dependent (other than bigger or
 smaller than some size threshold). I eventually started manually tweaking
 the file to find the boundary, and it's 1024 bytes as shown below.

 Here's a few traces for evidence. Note that the Content-Length flips
 from 1025 to 1024 when I remove a single byte from the request and
 processing time goes from over 1 second to a few hundred ms.

 *% time* curl -i -XPOST localhost:8753/echo -H Content-type:
 application/json -d @./single_join.5.json
 HTTP/1.1 200 OK
 Date: Fri, 15 Feb 2013 18:16:18 GMT
 Accept-Ranges: bytes
 Server: Restlet-Framework/2.1.1
 *Content-Length: 1025*
 Content-Type: application/xml; charset=UTF-8

 {  logical_ra : INSERT(JOIN(SCAN1,SCAN2)),  query_plan : {1 :
 [[{  op_name : SCAN1,  arg_user_name :
 test,  arg_rel*aaa*tion_name :
 testRelation},{  op_name : SCAN2,
  op_type : SQLiteScan,  arg_user_name : test,
  arg_program_name : test,  arg_relation_name : testRelation
},{  op_name : JOIN,  op_type
 : LocalJoin,  arg_child1 : SCAN1,  arg_columns1 :
 [1],  arg_child2 : SCAN2,  arg_columns2 : [0],
arg_select1 : [0],  arg_select2 : [1]   

Re: Converting EMF Representations on the Client using Restlet

2013-02-20 Thread Jerome Louvel
Hi Tas,

This should indeed work the way you expect. I suspect a bug in the
EmfConverter, maybe it isn't picket up correctly.

Could you enter an issue in GitHub?

Thanks,
Jerome
--
http://restlet.com
http://twitter.com/#!/jlouvel






2013/2/20 Tas Frangoullides tfrangoulli...@hotmail.com

 Hi,


 I'm trying out Restlet and I'm particularly interested in using it with
 EMF. I've started by trying the supplied emf extensions but I can't get the
 client to work how I'd like.

 This is my server resource:

 [code]
 public interface TimeSeriesResource
 {
 @Get
 public TimeSeries retrieve();

 @Put
 public void update(TimeSeries timeSeries);

 @Delete
 void remove();
 }
 [/code]

 Where Timeseries is an EObject.

 On the client the following code works:
 [code]
 ClientResource cr = new ClientResource(http://localhost:8182/timeseries/1
 );
 Representation representation = cr.get(MediaType.APPLICATION_ECORE);
 EmfRepresentationTimeSeries emfRed = new
 EmfRepresentation(representation);
 TimeSeries ts = emfRed.getObject();
 [/code]
 I'm also able to see a HTML rendered version in a web browser.

 However, using the EmfRepresentation seems unnecessary and I would have
 expected the following to just work:

 [code]
 TimeSeriesResource tsr = ClientResource.create(
 http://localhost:8182/timeseries/1;, TimeSeriesResource.class);
 TimeSeries timeSeries = tsr.retrieve();
 [/code]

 Instead I get this error: Unable to find a converter for this
 representation : application/octet-stream

 Is there something else I need to do to be able to use the client this
 way, or should I not be expecting the client to work this way?

 Many Thanks,

 Tas

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3049394


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

Re: internal NPE exception while handling 415 response

2013-02-14 Thread Jerome Louvel
Hi Dan,

We plan to release 2.1.2 early next week. If you can't wait, you indeed
need to build the sources.

We used to have automated 2.2 snapshots built daily, but we haven't
restored the cron scripts on our new machine.

Best regards,
Jerome


2013/2/13 Daniel Halperin dhalp...@cs.washington.edu


 On Sun, Feb 10, 2013 at 9:55 AM, Jérôme Louvel jlou...@restlet.comwrote:

 Hi Daniel,

 Thanks very much for the detailed report.

 I've been able to reproduce the issue, add a test case and fix the
 underlying problem (in both 2.1 and 2.2 branches).


 Thanks, Jérôme! That's great.

 How can I get these changes? (Do I have to rebuild the source? Will there
 be a 2.1.2 release soon?)

 Dan



 Actually, it was a serious issue beyond the JAX-RS extension itself as
 the internal connector wasn't restoring the current Response, Application,
 Context and Virtual Host (thread local variables) when writing the outbound
 entities.

 Thanks,
 Jerome
 --
 http://restlet.com
 http://twitter.com/#!/jlouvel



 2013/1/31 Daniel Halperin dhalp...@cs.washington.edu

 Hi everyone,

 I'm just getting started with RESTlet (v.2.1.1, with
 org.restlet.jee.ext.jackson  jee.ext.jaxrs), so I may be doing something
 very wrong. However, basic things work well for me. For instance, if I
 return POJOs from a function annotated with
 @Produces(MediaType.APPLICATION_JSON), they seem to be returned properly.

 Right now, I'm experimenting with implementing different handlers for
 different Content-Types. I started with the simplest possible: echo JSON
 input (converted to String) back as JSON:

 /**
  * Class that handles queries.
  *
  * @author dhalperi
  */
 @Path(/query)
 public final class QueryResource {
   /**
* For now, simply echoes back its input.
*
* @param input the payload of the POST request itself.
* @return the payload.
*/
   @POST
   @Produces(MediaType.APPLICATION_JSON)
   @Consumes(MediaType.APPLICATION_JSON)
   public String postNewQuery(final String input) {
 return input;
   }
 }

 If I access this resource with an invalid Content-Type (curl -i -XPOST
 localhost:8753/query -d hi), the curl process hangs and it looks like
 RESTlet experiences an internal exception deep in its code:

 Exception in thread Restlet-PipedWritableChannel
 java.lang.NullPointerException
  at
 org.restlet.ext.jaxrs.internal.provider.StringProvider.getCurrentResponseEntityCharset(StringProvider.java:98)
 at
 org.restlet.ext.jaxrs.internal.provider.StringProvider.writeTo(StringProvider.java:178)
  at
 org.restlet.ext.jaxrs.internal.provider.StringProvider.writeTo(StringProvider.java:63)
 at
 org.restlet.ext.jaxrs.internal.wrappers.provider.SingletonProvider.writeTo(SingletonProvider.java:350)
  at
 org.restlet.ext.jaxrs.internal.util.JaxRsOutputRepresentation.write(JaxRsOutputRepresentation.java:112)
 at
 org.restlet.representation.StreamRepresentation.write(StreamRepresentation.java:76)
  at org.restlet.engine.io.NioUtils$1.run(NioUtils.java:210)
 at java.lang.Thread.run(Thread.java:722)

 Google has literally no hits for 'Restlet-PipedWritableChannel'---so I
 came here. :)

 Note that if I use the expected Content-type, it works fine: curl -i
 -XPOST localhost:8753/query -H Content-type: application/json -d hi

 INFO: 2013-01-30 18:15:30 127.0.0.1 - - 8753 POST /query - 200 2 2 10
 http://localhost:8753 curl/7.28.1 -

 What suggestions does the group have for me?

 Thanks!
 Dan





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

Re: Restlet client freezing on HTTPS requests

2013-02-11 Thread Jerome Louvel
Hi Allan,

Thanks for the report. We had other persons reported similar issues with
HTTPS:
https://github.com/restlet/restlet-framework-java/issues/702

We'll investigate and try to fix this issue week, before releasing 2.1.2
and 2.2 M2.

Thanks,
Jerome
--
http://restlet.com
http://twitter.com/#!/jlouvel




2013/1/31 Allan Taschini satto...@gmail.com

 I'm trying to create a client-server application in Java using HTTPS and
 XML posts with Restlet.

 I've followed various tutorials, and managed to run the server side
 without problems (it responds correctly if I connect to it with a browser),
 but as soon I start the client they both freeze: the client doesn't
 complete its request and the server doesn't respond to browser requests
 anymore.

 Right now I'm using version 2.2 Milestone 1, but I also tried with version
 2.1.1 with no success. I'm using Eclipse Juno on MacOSX 10.7.5. The two
 stores have been created using the keytool command (I've created
 serverKey.jks, exported a self-signed certificate and added it to
 clientTrust.jks).
 The jars that I originally included were:

 org.restlet
 org.jssl.utils
 org.restlet.ext.ssl
 But I also tried to add the specific connecters (separately, with the
 dependencies listed in the libs readme.txt):

 org.restlet.ext.httpclient.jar
 org.restlet.ext.jetty.jar
 org.restlet.ext.net.jar
 org.restlet.ext.simple.jar

 TestHTTPS class
 --
 public class TestHTTPS extends Application{

 public static void main(String[] args) throws Exception{
 TestHTTPS t = new TestHTTPS();
 t.testhttps();
 }

 public void testhttps() throws Exception{
 Component comp = new Component();

 Server server = comp.getServers().add(Protocol.HTTPS, 8183);

 SeriesParameter servParameters =
 server.getContext().getParameters();
 servParameters.add(keystorePath, serverKey.jks);
 servParameters.add(keystorePassword, password);
 servParameters.add(keystoreType, JKS);
 servParameters.add(keyPassword, password);
 servParameters.add(tracing, true);

 comp.getDefaultHost().attach(new TestHTTPS());
 server.start();

 Context con = new Context();
 SeriesParameter clParameters = con.getParameters();

 clParameters.add(truststorePath, clientTrust.jks);
 clParameters.add(truststoreType, JKS);
 clParameters.add(truststorePassword, password);

 Client restletClient = new Client(con, Protocol.HTTPS);
 Reference resourceRef = new Reference(
 https://localhost:8183/user/myself;);

 Request request = new Request(Method.POST, resourceRef);
 request.getClientInfo().getAcceptedMediaTypes().add(new
 PreferenceMediaType(MediaType.TEXT_XML));

 Response response = restletClient.handle(request);
 System.out.println(response.getEntityAsText());

 restletClient.stop();
 server.stop();
 }

 @Override
 public Restlet createInboundRoot() {
 Router router = new Router(getContext());
 router.attach(/user/{id}, UserResource.class);
 return router;
 }
 }

 UserResource class
 
 public class UserResource extends ServerResource {
 @Post(xml)
 public Representation sendPostResponse(){
 return new StringRepresentation(Documentcontent/Document,
 MediaType.APPLICATION_XML);
 }

 @Get(xml)
 public Representation sendGetResponse(){
 return new StringRepresentation(Documentcontent/Document,
 MediaType.APPLICATION_XML);
 }
 }


 The only output from the console is:

 Starting the internal [HTTPS/1.1] server on port 8183
 Starting the internal [HTTPS/1.1] client

 Am I doing something wrong?

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3046970


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

Re: Maven artifacts disappearing

2013-02-11 Thread Jerome Louvel
Hi Peter,

Indeed, we have not restored all versions yet. Here are the list of missing
ones:

   - 2.1 RC2 - RC5
   - 2.0 M1 - M3
   - 2.0.11

We are planning to restore all of them but had others priorities so far.

If you need to build those artifacts manually, you can find all the tags
here:
https://github.com/restlet/restlet-framework-java/tags

Have a look at this page to get started:
https://github.com/restlet/restlet-framework-java/wiki/Building-the-source

Feel free to post additional questions.

Thanks,
Jerome
--
http://restlet.com
http://twitter.com/#!/jlouvel





2013/2/11 Peter Major peter.ma...@forgerock.com

 Hi,

 I can see 2.1-RC6, but 2.1-RC4 is missing. :( Do you have any scripts you
 can share to (re)deploy the artifacts?

 Thanks,
 Peter

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3048316


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

Re: internal NPE exception while handling 415 response

2013-02-10 Thread Jerome Louvel
Hi Daniel,

Thanks very much for the detailed report.

I've been able to reproduce the issue, add a test case and fix the
underlying problem (in both 2.1 and 2.2 branches).

Actually, it was a serious issue beyond the JAX-RS extension itself as the
internal connector wasn't restoring the current Response, Application,
Context and Virtual Host (thread local variables) when writing the outbound
entities.

Thanks,
Jerome
--
http://restlet.com
http://twitter.com/#!/jlouvel



2013/1/31 Daniel Halperin dhalp...@cs.washington.edu

 Hi everyone,

 I'm just getting started with RESTlet (v.2.1.1, with
 org.restlet.jee.ext.jackson  jee.ext.jaxrs), so I may be doing something
 very wrong. However, basic things work well for me. For instance, if I
 return POJOs from a function annotated with
 @Produces(MediaType.APPLICATION_JSON), they seem to be returned properly.

 Right now, I'm experimenting with implementing different handlers for
 different Content-Types. I started with the simplest possible: echo JSON
 input (converted to String) back as JSON:

 /**
  * Class that handles queries.
  *
  * @author dhalperi
  */
 @Path(/query)
 public final class QueryResource {
   /**
* For now, simply echoes back its input.
*
* @param input the payload of the POST request itself.
* @return the payload.
*/
   @POST
   @Produces(MediaType.APPLICATION_JSON)
   @Consumes(MediaType.APPLICATION_JSON)
   public String postNewQuery(final String input) {
 return input;
   }
 }

 If I access this resource with an invalid Content-Type (curl -i -XPOST
 localhost:8753/query -d hi), the curl process hangs and it looks like
 RESTlet experiences an internal exception deep in its code:

 Exception in thread Restlet-PipedWritableChannel
 java.lang.NullPointerException
  at
 org.restlet.ext.jaxrs.internal.provider.StringProvider.getCurrentResponseEntityCharset(StringProvider.java:98)
 at
 org.restlet.ext.jaxrs.internal.provider.StringProvider.writeTo(StringProvider.java:178)
  at
 org.restlet.ext.jaxrs.internal.provider.StringProvider.writeTo(StringProvider.java:63)
 at
 org.restlet.ext.jaxrs.internal.wrappers.provider.SingletonProvider.writeTo(SingletonProvider.java:350)
  at
 org.restlet.ext.jaxrs.internal.util.JaxRsOutputRepresentation.write(JaxRsOutputRepresentation.java:112)
 at
 org.restlet.representation.StreamRepresentation.write(StreamRepresentation.java:76)
  at org.restlet.engine.io.NioUtils$1.run(NioUtils.java:210)
 at java.lang.Thread.run(Thread.java:722)

 Google has literally no hits for 'Restlet-PipedWritableChannel'---so I
 came here. :)

 Note that if I use the expected Content-type, it works fine: curl -i
 -XPOST localhost:8753/query -H Content-type: application/json -d hi

 INFO: 2013-01-30 18:15:30 127.0.0.1 - - 8753 POST /query - 200 2 2 10
 http://localhost:8753 curl/7.28.1 -

 What suggestions does the group have for me?

 Thanks!
 Dan


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

  1   2   3   4   5   6   7   8   9   10   >