Hi all,

I have a GWT + Atom/Pub based application. The GWT client talks to a
server which serves data in Atom/Pub. For example, a HTTP GET request
to URL http://localhost:8080/atomserver/items returns data as below:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.3.0.GA_CP02 (build:
SVNTag=JBPAPP_4_3_0_GA_CP02 date=200808051050)/JBossWeb-2.0
Content-Type: application/atom+xml
Content-Length: 219
Date: Thu, 05 Mar 2009 13:18:19 GMT

<feed xmlns="http://www.w3.org/2005/Atom"; xmlns:xml="http://www.w3.org/
XML/1998/namespace" xml:base="http://127.0.0.1:8080/atomserver/
items/"><title type="text">All items</title></feed>

However, using GWT RequestBuilder to send a GET request to URL
http://localhost:8080/atomserver/items, returns an empty response. For
example in code snippet below, response.getText() returns null:

RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
URL.encode(url));

Request request = builder.sendRequest(null, new RequestCallback() {
    public void onResponseReceived(Request request, Response response)
{
        if (200 == response.getStatusCode()) {
            String res = response.getText();
        }


Can someone kindly confirm that this is a bug or GWT RequestBuilder is
designed in this way so that it only works with content type
"application/json"? Thanks.

BTW, is there any other way I can use to make HTTP calls (GET|POST|PUT|
DELETE) in GWT? UnfortunatelyGoogle Atom Feed API does not work for
me, as it only supports HTTP GET.

Thanks,
Jervis Liu

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to