Files and Libraries
C Client Library
Created 13. Juni 2017
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.
name | size | description |
---|---|---|
redback-rest-api.c | 290,87K | |
enunciate-common.c | 39,68K | Common code needed for all projects. |
C# Client Library
Created 13. Juni 2017
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.
//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...
name | size | description |
---|---|---|
redback-rest-api-dotnet.zip | 2,54K | The C# source code for the C# client library. |
Java XML Client Library
Created 13. Juni 2017
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.
java.net.URL url = new java.net.URL(baseURL + "/ldapGroupMappingService"); 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(ldapGroupMapping, connection.getOutputStream()); Object result = (Object) unmarshaller.unmarshal( connection.getInputStream() ); //handle the result as needed...
javax.ws.rs.client.Client client = javax.ws.rs.client.ClientBuilder.newClient(); Object result = client.target(baseUrl + "/ldapGroupMappingService") .put(javax.ws.rs.client.Entity.entity(ldapGroupMapping, "application/xml"), Object.class); //handle the result as needed...
name | size | description |
---|---|---|
redback-rest-api-xml-client.jar | 13,75K | The binaries for the Java XML client library. |
redback-rest-api-xml-client-xml-sources.jar | 11,67K | The sources for the Java XML client library. |
Objective C Client Library
Created 13. Juni 2017
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.
name | size | description |
---|---|---|
redback-rest-api.h | 17,05K | |
redback-rest-api.m | 219,52K | |
enunciate-common.h | 12,83K | Common header needed for all projects. |
enunciate-common.m | 42,34K | Common implementation code needed for all projects. |
PHP XML Client Library
Created 13. Juni 2017
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+.
//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();
name | size | description |
---|---|---|
redback-rest-api-php.zip | 6,22K |