OK, after some further debugging in hosted mode, although I don't see the
root of my problem in production mode, I do see that ClientAdapter.commit()
is doing:

                // Send the request to the client
                httpCall.sendRequest(request, response, new Uniform() {
                    public void handle(Request request, Response response) {
                        try {
                            updateResponse(response,
                                    new Status(httpCall.getStatusCode(),
null,
                                            httpCall.getReasonPhrase(),
null),
                                    httpCall);
                            userCallback.handle(request, response);

So, it is trying to copy the status code and reason phrase to the response
object, but for some reason the values coming back from httpCall in
production mode must be 0 and the empty string, respectively.

If I understand things correctly, userCallback is the auto-generated proxy
object, which calls my Result object's onSuccess()/onFailure() methods. 
Other than the copying of the status code and reason phrase from httpCall to
the response object, the rest of the response object is basically empty, so
even though I'm supplying the ClientResource to my Result object (via its
constructor) prior to making the HTTP request, using that ClientResource
object to get to the response object in my Result object's onSuccess()
method doesn't get me much.

It seems to me that it would be useful if more context from the response
could be passed through to the Result object's onSuccess/onFailure methods,
so that they could examine the response headers, for example.

To sum up, I'd like to take advantage of the Restlet's automatic object
serialization support in GWT, but it appears that by doing so, I lose access
to all of the response information other than the deserialized data.  That
seems kind of a shame; I wonder if some "best of both worlds" solution could
be added to a future version of Restlet?

-AndyD

--
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/accessing-response-Status-from-GWT-client-code-works-in-hosted-mode-but-not-production-tp7083856p7084101.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

Reply via email to