All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.webcohesion.enunciate.modules.gwt_json_overlay.library_description.fmt Maven / Gradle / Ivy

Go to download

The Enunciate GWT module generates the artifacts to support the GWT JSON Overlays for the JSON API data.

There is a newer version: 2.18.1
Show newest version
[#ftl]
[#-- @ftlvariable name="sample_resource" type="com.webcohesion.enunciate.api.resources.Method" --]
[#-- @ftlvariable name="sample_service_method" type="com.webcohesion.enunciate.modules.jaxws.model.WebMethod" --]
  

The Google Web Toolkit JSON Overlay library provides the JSON Overlays that can be used to access the Web service API for this application.

[#if sample_resource??]
JSON Overlay Example
String url = ...;
RequestBuilder request = new RequestBuilder(RequestBuilder.GET, url);
request.sendRequest(null, new RequestCallback() {
  public void onResponseReceived(Request request, Response response) {
    if (200 == response.getStatusCode()) {
      //handle the successful data...
  [#if sample_resource.responseEntity??]
      ${simpleNameFor(sample_resource.responseEntity, false)?html} data = ${simpleNameFor(sample_resource.responseEntity, false)?html}.fromJson(response.getText());
      //handle the ${simpleNameFor(sample_resource.responseEntity, false)?html}...
  [/#if]
    }
    else {
      //handle the error...
    }
  }

  public void onError(Request request, Throwable throwable) {
    //handle the error...
  }
});
    
[/#if]




© 2015 - 2025 Weber Informatics LLC | Privacy Policy