Files and Libraries
The following files and libraries are available:
Java Client Library
Created Oct 23, 2013 11:38:45 AM
Introduction
The Java client-side library is used to access the Web service API for this application.
The JAX-WS 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 REST endpoints that are published by this application.
REST Example (Raw JAXB)
java.net.URL url = new java.net.URL(baseURL + "/repo/files/properties");
JAXBContext context = JAXBContext.newInstance( RepositoryFileDto.class );
java.net.URLConnection connection = url.openConnection();
connection.connect();
Unmarshaller unmarshaller = context.createUnmarshaller();
RepositoryFileDto result = (RepositoryFileDto) unmarshaller.unmarshal( connection.getInputStream() );
//handle the result as needed...
REST Example (Jersey client)
com.sun.jersey.api.client.Client client = com.sun.jersey.api.client.Client.create();
RepositoryFileDto result = client.resource(baseUrl + "/repo/files/properties")
.get(RepositoryFileDto.class);
//handle the result as needed...
Files
name | size | description |
---|---|---|
enunciate-client.jar | 26.15K | The binaries for the Java client library. |
enunciate-client-sources.jar | 16.05K | The sources for the Java client library. |
Java JSON Client Library
Created Oct 23, 2013 11:38:45 AM
Introduction
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.
REST Example (Raw Jackson)
java.net.URL url = new java.net.URL(baseURL + "/repo/files/properties");
ObjectMapper mapper = new ObjectMapper();
java.net.URLConnection connection = url.openConnection();
connection.connect();
RepositoryFileDto result = (RepositoryFileDto) mapper.readValue( connection.getInputStream(), RepositoryFileDto.class );
//handle the result as needed...
Files
name | size | description |
---|---|---|
enunciate-json-client.jar | 21.18K | The binaries for the Java JSON client library. |
enunciate-json-client-sources.jar | 15.67K | The sources for the Java JSON client library. |
PHP Client Library
Created Oct 23, 2013 11:38:42 AM
Introduction
The PHP client-side library defines the PHP 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 requires the json_encode function which was included in PHP versions 5.2.0+.
Files
name | size |
---|---|
enunciate.php | 70.73K |
Ruby Client Library
Created Oct 23, 2013 11:38:42 AM
Introduction
The Ruby 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.
JSON REST Example
require 'net/https'
require 'uri'
//...
//read a resource from a REST url
url = URI.parse("...")
request = Net::HTTP::Get.new(url.request_uri)
http = Net::HTTP.new(url.host, url.port)
//set up additional http stuff...
res = http.start do |ht|
ht.request(request)
end
result = RepositoryFileDto.from_json(JSON.parse(res.body))
//handle the result as needed...
Files
name | size |
---|---|
enunciate.rb | 39.69K |