Saturday, August 30, 2014

AsyncCallback's methods are not called after rpc request is made.

I'm attempting to make an RPC request. The request is made successfully on the server, and the output is returned, however neither of my asyncCallback's methods (either onSuccess or onFailure) are called.

This is my code for making the request:

        Console.debug("making request " + request);
        service.execute(request, new AsyncCallback<Result<T>>()
        {
            @Override
            public void onFailure(Throwable caught)
            {
                Console.debug("In failure " + caught);
                callback.failure(caught);
            }

            @Override
            public void onSuccess(Result<T> result)
            {
                Console.debug("In success : " + result.getTarget() );
                callback.success( result );
                cache.put(request, result);
            }
        });
        Console.debug("made request " + request);


When this is run, this is the output that I see in my browser console:

Making request com.foo.shared.request.InitRequest@2a
made request com.foo.shared.request.InitRequest@2a
XHR finished loading: POST "http://localhost:8081/MyModule/myService". 

In my server logs, I see a log indicating that a successful result was sent, and if I check the output in chrome's console, I see this:

//OK[1,2,0,1,0,1,["com.foo.shared.result.ResultImpl/1133260868","com.foo.shared.request.InitRequest/2056085739"],0,7]

I assume this means the request was made OK, but neither my onSuccess nor onFailure methods are being called.

Anyone got any ideas? I've been using this exact same code on other sites, where it works without issue. On this particular site, its not working.

I'm testing in sdm mode on 2.6.1

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment