Files and Libraries

GWT JSON Overlay

Created May 4, 2018

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

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...
      JavaScriptObject data = JavaScriptObject.fromJson(response.getText());
      //handle the JavaScriptObject...
    }
    else {
      //handle the error...
    }
  }

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

Files
name size description
api-gwt-json-overlay.jar 192.76K The sources for the GWT JSON overlay.

Java JSON Client Library

Created May 4, 2018

The Java client-side library is used to provide the set of Java objects that can be serialized to/from JSON using Jackson. This is useful for accessing the JSON REST endpoints that are published by this application.

Resources Example (Raw JAXB)
java.net.URL url = new java.net.URL(baseURL + "/prm_pm/services/partner_manager/denycode/mappings");
ObjectMapper mapper = new ObjectMapper();
java.net.URLConnection connection = url.openConnection();
connection.setDoOutput(true);
connection.connect();

mapper.writeValue(connection.getOutputStream(), mappingItem);
Object result = (Object) mapper.readValue( connection.getInputStream(), Object.class );
//handle the result as needed...
    
Resources Example (Jersey client)
javax.ws.rs.client.Client client = javax.ws.rs.client.ClientBuilder.newClient();

Object result = client.target(baseUrl + "/prm_pm/services/partner_manager/denycode/mappings")
  .post(javax.ws.rs.client.Entity.entity(mappingItem, "application/json"), Object.class);

//handle the result as needed...
    

Files
name size description
api-json-client-json-sources.jar 193.82K The sources for the Java JSON client library.

Java XML Client Library

Created May 4, 2018

The Java client-side library is used to access the Web service API for this application using Java.

The Java client-side library is used to provide the set of Java objects that can be serialized to/from XML using JAXB. This is useful for accessing the resources that are published by this application.

Resources Example (Raw JAXB)
java.net.URL url = new java.net.URL(baseURL + "/prm_pm/services/partner_manager/denycode/mappings");
JAXBContext context = JAXBContext.newInstance( byte[].class, byte[].class );
java.net.URLConnection connection = url.openConnection();
connection.setDoOutput(true);
connection.connect();

Unmarshaller unmarshaller = context.createUnmarshaller();
Marshaller marshaller = context.createMarshaller();
marshaller.marshal(mappingItem, connection.getOutputStream());
Object result = (Object) unmarshaller.unmarshal( connection.getInputStream() );
//handle the result as needed...
    
Resources Example (Jersey client)
javax.ws.rs.client.Client client = javax.ws.rs.client.ClientBuilder.newClient();

Object result = client.target(baseUrl + "/prm_pm/services/partner_manager/denycode/mappings")
  .post(javax.ws.rs.client.Entity.entity(mappingItem, "application/xml"), Object.class);

//handle the result as needed...
    

Files
name size description
api-xml-client.jar 209.46K The binaries for the Java XML client library.
api-xml-client-xml-sources.jar 174.52K The sources for the Java XML client library.

JavaScript Client Library

Created May 4, 2018

The JavaScript client-side library defines classes that can be (de)serialized to/from JSON. This is useful for accessing the resources that are published by this application, but only those that produce a JSON representation of their resources (content type "application/json").

The library uses ES6 class syntax which has limited support. See MDN and the ES6 Compatibility Table for more details.

The library contains a UMD loader which supports AMD, CommonJS and browser globals. The browser global variable name for this library is "javascriptClient".

JavaScript Example
//read the resource in JSON:
var json = JSON.parse(jsonString);

//create an object
var object = new Object(json);

//retreive the json again
var newJson = object.toJSON();

//serialize the json
var newJsonString = JSON.stringify(newJson);
    

Files
name size description
api-js.zip 41.20K

The JavaScript client-side library defines classes that can be (de)serialized to/from JSON. This is useful for accessing the resources that are published by this application, but only those that produce a JSON representation of their resources (content type "application/json").

The library uses ES6 class syntax which has limited support. See MDN and the ES6 Compatibility Table for more details.

The library contains a UMD loader which supports AMD, CommonJS and browser globals. The browser global variable name for this library is "javascriptClient".

JavaScript Example
//read the resource in JSON:
var json = JSON.parse(jsonString);

//create an object
var object = new Object(json);

//retreive the json again
var newJson = object.toJSON();

//serialize the json
var newJsonString = JSON.stringify(newJson);