Files and Libraries

C Client Library

Created October 22, 2024

The C module generates the source code for the ANSI-C-compatible data structures and (de)serialization functions that can be used in conjunction with libxml2 to (de)serialize the REST resources as they are represented as XML data.

The generated C source code depends on the XML Reader API and the XML Writer API as well as the <time.h>, <string.h>, and <stdlib.h> C standard libraries.

Files
name size description
api.c 2.10M

The C module generates the source code for the ANSI-C-compatible data structures and (de)serialization functions that can be used in conjunction with libxml2 to (de)serialize the REST resources as they are represented as XML data.

The generated C source code depends on the XML Reader API and the XML Writer API as well as the <time.h>, <string.h>, and <stdlib.h> C standard libraries.

enunciate-common.c 39.68K Common code needed for all projects.

C# Client Library

Created October 22, 2024

The C# client-side library defines the classes that can be (de)serialized to/from XML. This is useful for accessing the HTTP resources that are published by this application.

C# Resource Example
//read a resource from a REST url
Uri uri = new Uri(...);

XmlSerializer s = new XmlSerializer(
  typeof( byte[] )
);

  //Create the request object
WebRequest req = WebRequest.Create(uri);
WebResponse resp = req.GetResponse();
Stream stream = resp.GetResponseStream();
TextReader r = new StreamReader( stream );

byte[] result = (byte[]) s.Deserialize( r );

//handle the result as needed...
    

Files
name size description
api-csharp-xml-client.zip 26.18K The C# source code for the C# client library.

GWT JSON Overlay

Created October 22, 2024

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 80.50K The sources for the GWT JSON overlay.

Java JSON Client Library

Created October 22, 2024

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 + "/AuthorizationSession");
ObjectMapper mapper = new ObjectMapper();
java.net.URLConnection connection = url.openConnection();
connection.setDoOutput(true);
connection.connect();

mapper.writeValue(connection.getOutputStream(), sessionAuthorizationModel);
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 + "/AuthorizationSession")
  .post(javax.ws.rs.client.Entity.entity(sessionAuthorizationModel, "application/json"), Object.class);

//handle the result as needed...
    

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

Java XML Client Library

Created October 22, 2024

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 + "/AuthorizationSession");
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(sessionAuthorizationModel, 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 + "/AuthorizationSession")
  .post(javax.ws.rs.client.Entity.entity(sessionAuthorizationModel, "application/xml"), Object.class);

//handle the result as needed...
    

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

JavaScript Client Library

Created October 22, 2024

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-javascript-client-js.zip 32.93K

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

model.xsd

Created October 22, 2024

Files
name size description
model.xsd 159.89K  

ns0.xsd

Created October 22, 2024

Files
name size description
ns0.xsd 2.53K  

ns1.xsd

Created October 22, 2024

Files
name size description
ns1.xsd 316.00bytes  

Objective C Client Library

Created October 22, 2024

The Objective C module generates the source code for the Objective C classes and (de)serialization functions that can be used in conjunction with libxml2 to (de)serialize the REST resources as they are represented as XML data.

The generated Objective C source code depends on the XML Reader API and the XML Writer API as well as the base OpenStep foundation classes.

Files
name size description
api.h 153.76K

The Objective C module generates the source code for the Objective C classes and (de)serialization functions that can be used in conjunction with libxml2 to (de)serialize the REST resources as they are represented as XML data.

The generated Objective C source code depends on the XML Reader API and the XML Writer API as well as the base OpenStep foundation classes.

api.m 1.59M

The Objective C module generates the source code for the Objective C classes and (de)serialization functions that can be used in conjunction with libxml2 to (de)serialize the REST resources as they are represented as XML data.

The generated Objective C source code depends on the XML Reader API and the XML Writer API as well as the base OpenStep foundation classes.

enunciate-common.h 12.83K Common header needed for all projects.
enunciate-common.m 42.34K Common implementation code needed for all projects.

PHP JSON Client Library

Created October 22, 2024

The PHP JSON client-side library defines the PHP 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").

This library requires the json_encode function which was included in PHP versions 5.2.0+.

PHP JSON Example
//read the resource in JSON:
$json = ...;

//read the json as an array.
$parsed = json_decode($json, true);

//read the json array as the object
$result = new Object($parsed);

//open a writer for the json
$json = $result->toJson();
    

Files
name size description
api-php-json-client-php.zip 38.64K

The PHP JSON client-side library defines the PHP 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").

This library requires the json_encode function which was included in PHP versions 5.2.0+.

PHP JSON Example
//read the resource in JSON:
$json = ...;

//read the json as an array.
$parsed = json_decode($json, true);

//read the json array as the object
$result = new Object($parsed);

//open a writer for the json
$json = $result->toJson();
    

PHP XML Client Library

Created October 22, 2024

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

This library leverages the XMLReader and XMLWriter tools that were included in PHP versions 5.1.0+.

PHP XML Example
//read the resource in XML form:
$xml = ...;

$reader = new \XMLReader();

if (!$reader->open($xml)) {
  throw new \Exception('Unable to open ' . $xml);
}
$result = new Object($reader);

//open a writer for the xml
$out = ...;
$writer = new \XMLWriter();
$writer->openUri($out);
$writer->startDocument();
$writer->setIndent(4);
$result->toXml($writer);
$writer->flush();
    

Files
name size description
api-php-xml-client-php.zip 49.69K

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

This library leverages the XMLReader and XMLWriter tools that were included in PHP versions 5.1.0+.

PHP XML Example
//read the resource in XML form:
$xml = ...;

$reader = new \XMLReader();

if (!$reader->open($xml)) {
  throw new \Exception('Unable to open ' . $xml);
}
$result = new Object($reader);

//open a writer for the xml
$out = ...;
$writer = new \XMLWriter();
$writer->openUri($out);
$writer->startDocument();
$writer->setIndent(4);
$result->toXml($writer);
$writer->flush();
    

Ruby JSON Client Library

Created October 22, 2024

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

This library leverages the Ruby JSON Implementation, which is required in order to use this library.

Ruby JSON Example
require 'net/https'
require 'uri'
//...

//read a resource from a REST url
url = URI.parse("...")
request = Net::HTTP::Post.new(url.request_uri)
input = Object.new
//set up the Object...
request.body = input.to_json
request['Content-Type'] = "application/json"

http = Net::HTTP.new(url.host, url.port)
//set up additional http stuff...
res = http.start do |ht|
  ht.request(request)
end

result = Object.from_json(JSON.parse(res.body))

//handle the result as needed...
    

Files
name size description
api.rb 432.84K

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

This library leverages the Ruby JSON Implementation, which is required in order to use this library.

Ruby JSON Example
require 'net/https'
require 'uri'
//...

//read a resource from a REST url
url = URI.parse("...")
request = Net::HTTP::Post.new(url.request_uri)
input = Object.new
//set up the Object...
request.body = input.to_json
request['Content-Type'] = "application/json"

http = Net::HTTP.new(url.host, url.port)
//set up additional http stuff...
res = http.start do |ht|
  ht.request(request)
end

result = Object.from_json(JSON.parse(res.body))

//handle the result as needed...