Jerome Louvel | 5 Aug 16:27 2014

Restlet Framework 2.2.2 released

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:

Shai Levit | 31 Jul 18:23 2014
Picon

Reading and Parsing Headers in Restlet

How can one read and parse a header using Restlet?
Specifically, if the client header includes an ID (or just some number) and this number needs to be checked
against an Array of numbers (or it can be a file or a hash table) to assure that this number is stored and
valid. If so, then the attachment file can be POSTed, otherwise a random number is generated o the client in
the return message.

I have tried several different ways, but none seem to really work and I thought I could get some step by step
insight on this. Please note I am NEW to this, not just Restlet, but REST all together.

Thanks

PS: I have some preliminary code(s) I can post if that is helpful, but I did not want to taint someones
solution(s) and thought process.

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

Tal Liron | 21 Jul 07:40 2014

Missing git tags

There are no git tagd for versions 2.2.0 and 2.2.1. Would the Restlet team happen to have the git hashes
recorded somewhere?

I am chasing a nasty bug and want to make sure I'm on the right code.

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

Jerome Louvel | 7 May 06:05 2014

Announcing HTML newsletter and Restlet web API platform

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 and Twitter  <at> 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. 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) 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!
Jerome Louvel | 7 Feb 00:05 2014

GitHub issues reorganization

Hi all,

In preparation of the new Restlet Framework 3.0 dev cycle, some clean-up was due in our GitHub issue tracker.

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:
Best regards,
Andy Dennie | 25 Jan 14:33 2014

suggestion for facilitating exception translation

All of my ServerResource subclasses have methods containing exception translation boilerplate, like
this: 

public class MyResource extends MyBaseResource { 
     <at> Get 
    public Foo getFoo() { 
        Foo result = null; 
        try { 
            result = .... 
        } 
        catch (RuntimeException e) { 
            doCatch(e) 
        } 
        return result; 
    } 
} 

and then MyBaseResource implements doCatch like this: 

    protected void doCatch(final RuntimeException e) { 
        Class<?> exceptionClass = e.getClass(); 
        if (IllegalArgumentException.class.isAssignableFrom(exceptionClass)) { 
            // chain & translate to a 400 
            throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, e.getMessage(), e); 
        } 

        // NotFoundException is a custom exception class I've defined
        if (NotFoundException.class.isAssignableFrom(exceptionClass)
                || IndexOutOfBoundsException.class.isAssignableFrom(exceptionClass)) {
            // chain & translate to a 404
            throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, e.getMessage(), e);
        }

        if (UnsupportedOperationException.class.isAssignableFrom(exceptionClass)) {
            // chain & translate to a 405
            throw new ResourceException(Status.CLIENT_ERROR_METHOD_NOT_ALLOWED, e.getMessage(), e);
        }

        // ConflictException is a custom exception class I've defined
        if (ConflictException.class.isAssignableFrom(exceptionClass)
                || IllegalStateException.class.isAssignableFrom(exceptionClass)) {
            // chain & translate to a 409
            throw new ResourceException(Status.CLIENT_ERROR_CONFLICT, e.getMessage(), e);
        }

        throw e; 
    } 

It would be nice if I didn't have to put that try/catch boilerplate in all my  <at> Get,  <at> Put,  <at> Post, etc. methods. 

I was thinking that a method like 
    protected ResourceException translateException(final RuntimeException e) 

defined on ServerResource would be nice to have.  It could be called from ServerResource.doHandle if an
exception is thrown, giving the resource object a chance to do the translation to a ResourceException.  If
that method returned null, then ServerResource could do its own translation. 

Thoughts?

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

Jerome Louvel | 21 Sep 00:46 2013

New IntelliJ IDEA license

We have received a new license for IntelliJ IDEA that was kindly offered by JetBrains. Thanks to Martin Svenson for handling the process.

Restlet committers can contact me in order to get a copy.

Best regards,
Jerome

Paul Sprague | 7 May 16:51 2013
Picon

How to implement an AMQP client+server connector?

Hello!

Can anyone on this list make some recommendations as to how a connector could be implemented that isn't
based on HTTP? I was initially think that I needed to implement a connector, connection, controller,
in/outbound ways, etc. But after looking at the code I'm not so sure this is the correct approach.

My thought was to leverage Apache Qpid as the underlying implementation. I just need some idea as to how I can
integrate it into restlet.

Thanks,
Paul

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

Juan | 7 Jan 21:11 2013
Picon

access webservice with hostname versus localhost

I have been playing with the Restlet examples, seems that the URI defined in the router.attach call
(http://localhost:8111/hello) needs to called exactly like it from the clients, including the host
name. If my local machine is named galaxy18 and i run the webservice and local client, I can only access it
via localhost:8111/hello. If I change the router.attach to http://galaxy18:8111/hello then the
client can access it with galaxy18 but not with localhost.

I don't like hardcording, especially machine names, if you can imagine this will be a pain if my webservice
is running on different machines.

Is this an instance where I need to use read the hostname into a variable then use that in the router.attach or
am i missing something basic here?

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

Jerome Louvel | 1 Oct 13:46 2012

Restlet license for IntelliJ IDE

Hi all,

 

For Restlet code contributors, we have a free license available thanks to JetBrains.

 

Please contact us directly for additional information.

 

Thanks,

Jerome

--

http://www.restlet.com

http://twitter.com/#!/jlouvel

 

Cyril Lakech | 23 Jul 19:19 2012
Picon

Restlet 2.1-RC5 and GWT 2.4 POST entity issue

Hi,

We use Restlet 2.1-RC5 and GWT 2.4 with restlet gwt extension and we
face a 415 error on posting content from the GWT app to the restlet
API: "Too few tokens in RPC request" (see errors below [1])

We can't find any solution to this exception. Debugging restlet/gwt
doesn't help...

Here is a sample of an entity sent to the server :

7|0|3|/wikeo-core/business/v2/families/|null|com.adeo.wikeo.business.family.domain.Family/881681172|1|2|3|

GET works perfectly, but when we try to POST/PUT content to the server
we get a 415 error

Any idea ?

[1]

Jul 23, 2012 4:01:21 PM org.restlet.service.ConverterService toObject
WARNING: Unable to convert a
[application/x-java-serialized-object+gwt,UTF-8] representation into
an object of class com.adeo.wikeo.business.family.domain.Family
java.io.IOException: Couldn't read the GWT object representation: Too
few tokens in RPC request at
org.restlet.ext.gwt.ObjectRepresentation.getObject(ObjectRepresentation.java:126)
at org.restlet.ext.gwt.GwtConverter.toObject(GwtConverter.java:149) at
org.restlet.service.ConverterService.toObject(ConverterService.java:167)
at org.restlet.resource.Resource.toObject(Resource.java:828) at
org.restlet.resource.ServerResource.doHandle(ServerResource.java:481)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:545)
at org.restlet.resource.ServerResource.post(ServerResource.java:1178)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:430)
at org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:646)
at org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:341)
at org.restlet.resource.ServerResource.handle(ServerResource.java:944)
at org.restlet.resource.Finder.handle(Finder.java:246) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Router.doHandle(Router.java:431) at
org.restlet.routing.Router.handle(Router.java:648) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:154)
at org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211) at
org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:84)
at org.restlet.Application.handle(Application.java:381) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Router.doHandle(Router.java:431) at
org.restlet.routing.Router.handle(Router.java:648) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Router.doHandle(Router.java:431) at
org.restlet.routing.Router.handle(Router.java:648) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211) at
org.restlet.Component.handle(Component.java:392) at
org.restlet.Server.handle(Server.java:516) at
org.restlet.engine.ServerHelper.handle(ServerHelper.java:72) at
org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:152)
at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1089)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at net.stax.appserver.webapp.RequestMonitorValve.invoke(RequestMonitorValve.java:35)
at net.stax.appserver.admin.StaxApplicationQueryValve.invoke(StaxApplicationQueryValve.java:49)
at net.stax.appserver.webapp.RequestSetupValve.invoke(RequestSetupValve.java:31)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:647)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662) Caused by:
com.google.gwt.user.client.rpc.SerializationException: Too few tokens
in RPC request at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract(ServerSerializationStreamReader.java:809)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt(ServerSerializationStreamReader.java:493)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:104)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(ServerSerializationStreamReader.java:138)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:385)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeClass(ServerSerializationStreamReader.java:670)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:724)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeClass(ServerSerializationStreamReader.java:698)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:724)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:560)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(ServerSerializationStreamReader.java:138)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:385)
at org.restlet.ext.gwt.ObjectRepresentation.getObject(ObjectRepresentation.java:122)
... 60 more Caused by: java.lang.IndexOutOfBoundsException: Index: 9,
Size: 9 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at
java.util.ArrayList.get(ArrayList.java:322) at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract(ServerSerializationStreamReader.java:807)
... 73 more Jul 23, 2012 4:01:21 PM org.restlet.engine.log.LogFilter
afterHandle INFO: 2012-07-23 16:01:21 109.7.6.135 - 10.202.30.193 80
POST /wikeo-core/business/v2/families/ - 415 554 156 37
http://toolfamilydev-antoine.webadeo.cloudbees.net Mozilla/5.0
(Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like
Gecko) Chrome/19.0.1084.56 Safari/536.5
http://toolfamilydev-antoine.webadeo.cloudbees.net/

Cyril Lakech
0684482444

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


Gmane