Re: Empty Response From HTTP Request

2011-05-13 Thread Nick Apperley
All web services were returning json but not in a way that is treated
as jsonp for the GWT client. Once that was fixed no more timeouts
occurred for future requests. However there is now a bizarre issue
where the ArrayList that was populated in the defined onSuccess method
(for the AsyncCallback object) is now empty outside of the method
definition. How can that happen when no items have been removed from
the ArrayList? The ArrayList was defined outside of the object.


On May 13, 5:34 pm, A. Stevko andy.ste...@gmail.com wrote:
 Can you at least see the size of the response like in an apache log file?
 Try using FireBug's Net Panel to see the request/response size/duration.




-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Empty Response From HTTP Request

2011-05-13 Thread Nick Apperley
As it turns out AsyncCallback doesn't have a way to inform that it is
finished. Therefore anything that needs the proper results from the
request would need to be done in the AsyncCallback's onSuccess method.


On May 13, 6:12 pm, Nick Apperley napper...@gmail.com wrote:
 All web services were returning json but not in a way that is treated
 as jsonp for the GWT client. Once that was fixed no more timeouts
 occurred for future requests. However there is now a bizarre issue
 where the ArrayList that was populated in the defined onSuccess method
 (for the AsyncCallback object) is now empty outside of the method
 definition. How can that happen when no items have been removed from
 the ArrayList? The ArrayList was defined outside of the object.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Empty Response From HTTP Request

2011-05-12 Thread A. Stevko
Hi Nick,
Are you saying that the server response is empty or that RequestBuilder does
not recognize the response?
If its the former, the server is not recognizing something in the request
like the browser code headers.
If its the latter, then I would compare the content-type and formatting of
the response with a benchmark response from the eclipse dev tool.
Either way, you'll need to get below just looking at the browser display to
understand  diagnose the communication protocols. I suggest using a logging
proxy server on your test bench to track what is coming and going. MS
Fiddler works well on Windows.
---Stevko


On Wed, May 11, 2011 at 3:14 PM, Nick Apperley napper...@gmail.com wrote:

 Using RequestBuilder I can successfully make a request to the
 Glassfish 3.1 server I have setup. The server delivers REST web
 services that involve HTTP GET and POST. Currently I am testing to see
 if I can establish communication between the server and the GWT
 client. What isn't working is getting the correct response for the
 particular web service used (a HTTP GET).

 In Firefox with the same web service used it receives the correct
 response which is an XML file. This confirms that the web service is
 working properly. What are the possible causes for an empty response
 from a HTTP request with GWT?

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
-- A. Stevko
===
If everything seems under control, you're just not going fast enough. M.
Andretti

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Empty Response From HTTP Request

2011-05-12 Thread Nick Apperley
Every time a request is made with RequestBuilder an empty response is
returned from the server. If the request is made using just the web
browser in an empty tab a non empty response is returned from the
server that is displayed directly (in Firefox). With the latter the
expected response is returned from the server.

After doing some further investigation on the issue it seems as though
the empty response could be caused by GWT's Same Origin Policy. The
web services are running on a different server from the GWT client.
What was suggested was to use JsonpRequestBuilder instead of
RequestBuilder to bypass the SOP problem. However that can only be
done if one can change the REST web services to return Json instead of
XML.

I have undertaken the suggestion but now have an entirely new problem
to content with. Timeouts are occurring every time a request is made
using JsonpRequestBuilder. I have checked to see that the URL is
correct, and have extended the timeout duration but still end up with
the same problem. What could cause a timeout to occur with doing a
request with JsonpRequestBuilder?



A. Stevko wrote:
 Hi Nick,
 Are you saying that the server response is empty or that RequestBuilder does
 not recognize the response?
 If its the former, the server is not recognizing something in the request
 like the browser code headers.
 If its the latter, then I would compare the content-type and formatting of
 the response with a benchmark response from the eclipse dev tool.
 Either way, you'll need to get below just looking at the browser display to
 understand  diagnose the communication protocols. I suggest using a logging
 proxy server on your test bench to track what is coming and going. MS
 Fiddler works well on Windows.
 ---Stevko


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Empty Response From HTTP Request

2011-05-12 Thread Nick Apperley
What is really weird is that the timeouts are occurring with making a
request via JsonRequestBuilder yet the Glassfish server has received
the request successfully. I have been digging through the Glassfish
server logs and found an identical set of entries for 2 requests that
were made (one from GWT client, the other from the web browser). What
isn't recorded in the logs is if the server has sent back a response,
and its content if it was sent.

Right now I do not know what is happening with the server responses.
Presumably a response is being sent back to the GWT client. At least a
response has been sent back for the request made by the web browser.


On May 13, 10:15 am, Nick Apperley napper...@gmail.com wrote:
 I have undertaken the suggestion but now have an entirely new problem
 to content with. Timeouts are occurring every time a request is made
 using JsonpRequestBuilder. I have checked to see that the URL is
 correct, and have extended the timeout duration but still end up with
 the same problem. What could cause a timeout to occur with doing a
 request with JsonpRequestBuilder?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Empty Response From HTTP Request

2011-05-12 Thread A. Stevko
Can you at least see the size of the response like in an apache log file?
Try using FireBug's Net Panel to see the request/response size/duration.

On Thu, May 12, 2011 at 4:25 PM, Nick Apperley napper...@gmail.com wrote:

 What is really weird is that the timeouts are occurring with making a
 request via JsonRequestBuilder yet the Glassfish server has received
 the request successfully. I have been digging through the Glassfish
 server logs and found an identical set of entries for 2 requests that
 were made (one from GWT client, the other from the web browser). What
 isn't recorded in the logs is if the server has sent back a response,
 and its content if it was sent.

 Right now I do not know what is happening with the server responses.
 Presumably a response is being sent back to the GWT client. At least a
 response has been sent back for the request made by the web browser.


 On May 13, 10:15 am, Nick Apperley napper...@gmail.com wrote:
  I have undertaken the suggestion but now have an entirely new problem
  to content with. Timeouts are occurring every time a request is made
  using JsonpRequestBuilder. I have checked to see that the URL is
  correct, and have extended the timeout duration but still end up with
  the same problem. What could cause a timeout to occur with doing a
  request with JsonpRequestBuilder?

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
-- A. Stevko
===
If everything seems under control, you're just not going fast enough. M.
Andretti

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Empty Response From HTTP Request

2011-05-11 Thread Nick Apperley
Using RequestBuilder I can successfully make a request to the
Glassfish 3.1 server I have setup. The server delivers REST web
services that involve HTTP GET and POST. Currently I am testing to see
if I can establish communication between the server and the GWT
client. What isn't working is getting the correct response for the
particular web service used (a HTTP GET).

In Firefox with the same web service used it receives the correct
response which is an XML file. This confirms that the web service is
working properly. What are the possible causes for an empty response
from a HTTP request with GWT?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.