Hi All,
I have deployed the GWT web app ( only client code. no server code is
present) on JBOSS. web client is accessing a URL ( Servlet of
different application. not the GWT servlet)  on the same server  using
POST. The servlet is getting the Request (xml string) from GWT client
app and responding with a xml string ( appeared in the servlet logs).
But the GWT client's  onResponseReceived () always return a status
code 0 with response data null.

here  the basic code i am using. no fancy of it.

                String eventParticipationReq="<Count id=\"1\"></Count>";
                String serverURL="http://myserver:8080/b1/MyServlet?";;
                Log.info(serverURL);
                Log.info(eventParticipationReq);
                RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
serverURL);
                        try {


                          Log.info("Request Data :"+eventParticipationReq);
                      Request response = builder.sendRequest("", new
RequestCallback() {
                            public void onError(Request request, Throwable 
exception) {
                                // Couldn't connect to server (could be 
timeout, SOP
violation, etc.)
                             }

                             public void onResponseReceived(Request request, 
Response
response) {
                                 Log.info(""+response.getStatusCode());
                                 Log.info(""+request.isPending());
                                 if (200 == response.getStatusCode()) {
                                   Log.info(response.getText());
                               } else {
                                 // Handle the error.  Can get the status text 
from
response.getStatusText()
                               }
                             }
                           });
                      return null;
                    } catch (RequestException e) {
                      // Code omitted for clarity
                        e.printStackTrace();
                    }

=====================================================

Can some one please let me know what i should  change in the code?


-- 
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