Hi Brian,

Thanks. I've just fixed both issues in SVN trunk.

Actually, we are in the middle of some deep build changes that will fully 
automate the port from the main Restlet source to various editions we now 
support (GWT, Android, GAE, etc.). I hope that the GWT API will stabilize 
around what is in SVN trunk. We hope to have this done by Restlet 2.0 M4.

Best regards,
Jerome Louvel
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com

-----Message d'origine-----
De : Brian Anderson [mailto:b...@nwlink.com] 
Envoyé : lundi 29 juin 2009 21:24
À : discuss@restlet.tigris.org
Objet : RE: Restlet trunk andd GWT issues...

FWIW, the following change in HttpClientConverter.java seems to fix the NPE:

    public void commit(final HttpClientCall httpCall, Request request,
            Response response, final Uniform userCallback) throws Exception {
        if (httpCall != null) {
            // Send the request to the client
            httpCall.sendRequest(request, response, new Uniform() {

                public void handle(Request request, Response response,
                        Uniform callback) {
                    updateResponse(response, httpCall);
                    userCallback.handle(request, response, null);


> Hello,
> I am working with the GWT edition and trunk r5150 in order to get the recent 
> changes that fix content negotiation issues present in 2.0m3.
> I have a simple GWT app loosely based upon the RestletGWTSimpleExample. I 
> notice that I cannot get my GWT app to run in hosted mode without changing 
> the source element in GWT.gwt.xml. The trunk version specifies:
>   <source path="."/>
> which causes a "Non-canonical source path: ./" in the hosted mode browser 
> followed by numerous other derived errors. Changing the offending source 
> statement to:
>   <source path=""/>
> apparently solves the issue.
> I have not been able to find RestletGWTSimpleExample in the svn sources or on 
> the site other than through the link provided. Obviously there have been 
> changes made in the callback mechanism between 2.0m3 and the trunk version. 
> Attempting the following:
>         // Add an AJAX call to the server
>         final Client client = new Client(Protocol.HTTP);
>         client.get(PING_URL, new Uniform() {
>             public void handle(Request request, Response response, Uniform 
> callback) {
>               pingText.setText(res​ponse.getEntity().ge​tText());
>             }
>           });
> gets me past compilation issues but results in an NPE:
> [ERROR] Uncaught exception escaped
> java.lang.NullPointerException: null
>     at 
> org.restlet.engine.h​ttp.HttpClientConver​ter$1.handle(HttpCl​ientConverter.java:3​84)
>     at 
> org.restlet.engine.h​ttp.GwtHttpClientCal​l$2.onResponseRecei​ved(GwtHttpClientCal​l.java:236)
>     at 
> com.google.gwt.http.​client.Request.fireO​nResponseReceivedImp​l(Request.java:264)
> So, I am wondering if I have the callback pattern properly coded, or maybe 
> this isn't yet ready for prime time?
> Also, it would be helpful if the RestletGWTSimpleExample source was in the 
> svn trunk and updated along with the core.
> Thanks for any help you can provide.
> ba



Reply via email to