Receive custom exceptions from Restlet Framework in GWT client

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Receive custom exceptions from Restlet Framework in GWT client

rcbeuker
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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Receive custom exceptions from Restlet Framework in GWT client

Jerome Louvel-3
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 <[hidden email]> 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

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Receive custom exceptions from Restlet Framework in GWT client

rcbeuker
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Receive custom exceptions from Restlet Framework in GWT client

Jerome Louvel-3
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 <[hidden email]> 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

Loading...