Package com.google.gwt.http.client

Examples of com.google.gwt.http.client.RequestException


      });
      xmlHttpRequest.send();
    }
    catch (JavaScriptException e) {
      xmlHttpRequest = null;
      listener.onError(new RequestException(e.getMessage()), false);
    }
  }
View Full Code Here


        LOG.trace().log("Snapshot response recieved: ", response.getText());
        // Pull the snapshot out of the response object and return it using
        // the provided callback function.
        if (response.getStatusCode() != Response.SC_OK) {
          callback.onFailure(
              new RequestException("Got back status code " + response.getStatusCode()));
        } else if (!response.getHeader("Content-Type").startsWith("application/json")) {
          callback.onFailure(new RuntimeException("Fetch service did not return json"));
        } else {
          WaveViewData waveView;
          try {
View Full Code Here

      final Request req = builder.sendRequest(request.toString(), new RequestCallback() {
        @Override
        public void onResponseReceived(@Nullable final Request req, @Nullable final Response res) {
          requests.remove(req);
          if (res.getStatusCode() != Response.SC_OK) {
            callback.onError(new RequestException("Invalid status "+res.getStatusCode()+": "+res.getStatusText()));
            return;
          }
         
          final XMLPacket response = XMLBuilder.fromXML(res.getText());
          if (response == null || !"body".equals(response.getTagName())){
            callback.onError(new RequestException("Bad response: " + res.getText()));
            return;
          }
         
          callback.onSuccess(response);
        }
View Full Code Here

TOP

Related Classes of com.google.gwt.http.client.RequestException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.