| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="utf-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> |
| |
| <title>Apache Archiva Redback REST API: Files and Libraries</title> |
| |
| <!-- Mobile viewport optimized: j.mp/bplateviewport --> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| <!-- Bootstrap core CSS --> |
| <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> --> |
| |
| <!--custom css for these pages--> |
| <link rel="stylesheet" href="css/enunciate.css"> |
| |
| <link href="https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.css" type="text/css"> |
| |
| <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> |
| <!--[if lt IE 9]> |
| <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> |
| <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
| <![endif]--> |
| </head> |
| |
| <body class="home"> |
| <div class="container"> |
| <header> |
| |
| <div id="header" class="column first last span-20"> |
| <div id="site-name" class="column span-18 append-1 prepend-1 first last"><a href="index.html">Apache Archiva Redback REST API: Files and Libraries</a></div> |
| <div id="primary" class="column span-18 append-1 prepend-1 first last"> |
| <ul class="navigation"> |
| <li id="nav-rest"><a href="resources.html">REST</a></li> |
| <li id="nav-data"><a href="data.html">Data Model</a></li> |
| </ul> |
| </div> |
| <div> |
| <ul class="xbreadcrumbs" id="breadcrumbs"> |
| <li> |
| <a href="index.html" class="home">Home</a> > |
| |
| </li> |
| <li class="current"> |
| <a href="downloads.html">Files and Libraries</a> |
| |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!--<nav class="navbar navbar-inverse navbar-fixed-top"> |
| <div class="container-fluid"> |
| <div class="navbar-header"> |
| <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"> |
| <span class="sr-only">Toggle navigation</span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| <span class="icon-bar"></span> |
| </button> |
| <a class="navbar-brand" href="index.html">Apache Archiva Redback REST API: Files and Libraries</a> |
| </div> |
| <div id="navbar" class="navbar-collapse collapse"> |
| <ul class="nav navbar-nav navbar-right"> |
| <li><a href="resources.html">Resources</a></li> |
| <li><a href="data.html">Data Types</a></li> |
| <li><a href="downloads.html">Files and Libraries</a></li> |
| </ul> |
| </div> |
| </div> |
| </nav>--> |
| </header> |
| <div id="main" class="column first last span-20"> |
| |
| <h1 class="page-header">Files and Libraries</h1> |
| |
| <h3 id="artifact_c_client_library">C Client Library</h3> |
| <p class="lead">Created November 30, 2019</p> |
| <p><p> |
| 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 <a href="http://xmlsoft.org/">libxml2</a> to (de)serialize |
| the REST resources as they are represented as XML data. |
| </p> |
| |
| <p> |
| The generated C source code depends on the <a href="http://xmlsoft.org/html/libxml-xmlreader.html">XML Reader API</a> |
| and the <a href="http://xmlsoft.org/html/libxml-xmlwriter.html">XML Writer API</a> as well as the <code><time.h></code>, |
| <code><string.h></code>, and <code><stdlib.h></code> C standard libraries. |
| </p> |
| |
| </p> |
| <table class="table table-hover"> |
| <caption>Files</caption> |
| <thead> |
| <tr> |
| <th>name</th> |
| <th>size</th> |
| <th>description</th> |
| </tr> |
| </thead> |
| <tbody data-link="row" class="rowlink"> |
| <tr class="clickable-row" data-href="redback-rest-api.c"> |
| <td>redback-rest-api.c</td> |
| <td>290,87K</td> |
| <td> </td> |
| </tr> |
| <tr class="clickable-row" data-href="enunciate-common.c"> |
| <td>enunciate-common.c</td> |
| <td>39,68K</td> |
| <td>Common code needed for all projects.</td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="artifact_csharp_client_library">C# Client Library</h3> |
| <p class="lead">Created November 30, 2019</p> |
| <p> |
| <p> |
| 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. |
| </p> |
| |
| <div class="panel panel-default"> |
| <div class="panel-heading">C# Resource Example</div> |
| <div class="panel-body"> |
| <pre class="prettyprint lang-csharp"> |
| //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... |
| </pre> |
| </div> |
| </div> |
| </p> |
| <table class="table table-hover"> |
| <caption>Files</caption> |
| <thead> |
| <tr> |
| <th>name</th> |
| <th>size</th> |
| <th>description</th> |
| </tr> |
| </thead> |
| <tbody data-link="row" class="rowlink"> |
| <tr class="clickable-row" data-href="redback-rest-api-csharp-xml-client.zip"> |
| <td>redback-rest-api-csharp-xml-client.zip</td> |
| <td>2,54K</td> |
| <td>The C# source code for the C# client library.</td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3> |
| <p class="lead">Created November 30, 2019</p> |
| <p> <p> |
| The <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> JSON Overlay library provides the JSON Overlays that |
| can be used to access the Web service API for this application. |
| </p> |
| |
| |
| <div class="panel panel-default"> |
| <div class="panel-heading">JSON Overlay Example</div> |
| <div class="panel-body"> |
| <pre class="prettyprint lang-java"> |
| 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... |
| } |
| }); |
| </pre> |
| </div> |
| </div> |
| </p> |
| <table class="table table-hover"> |
| <caption>Files</caption> |
| <thead> |
| <tr> |
| <th>name</th> |
| <th>size</th> |
| <th>description</th> |
| </tr> |
| </thead> |
| <tbody data-link="row" class="rowlink"> |
| <tr class="clickable-row" data-href="redback-rest-api-gwt-json-overlay.jar"> |
| <td>redback-rest-api-gwt-json-overlay.jar</td> |
| <td>10,44K</td> |
| <td>The sources for the GWT JSON overlay.</td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="artifact_java_xml_client_library">Java XML Client Library</h3> |
| <p class="lead">Created November 30, 2019</p> |
| <p><p> |
| The Java client-side library is used to access the Web service API for this application using Java. |
| </p> |
| |
| <p> |
| The Java client-side library is used to provide the set of Java objects that can be serialized |
| to/from XML using <a href="https://jaxb.dev.java.net/">JAXB</a>. This is useful for accessing the |
| resources that are published by this application. |
| </p> |
| |
| <div class="panel panel-default"> |
| <div class="panel-heading">Resources Example (Raw JAXB)</div> |
| <div class="panel-body"> |
| <pre class="prettyprint lang-java"> |
| 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(ldapGroupMappingUpdateRequest, connection.getOutputStream()); |
| Object result = (Object) unmarshaller.unmarshal( connection.getInputStream() ); |
| //handle the result as needed... |
| </pre> |
| </div> |
| </div> |
| |
| <div class="panel panel-default"> |
| <div class="panel-heading">Resources Example (Jersey client)</div> |
| <div class="panel-body"> |
| <pre class="prettyprint lang-java"> |
| javax.ws.rs.client.Client client = javax.ws.rs.client.ClientBuilder.newClient(); |
| |
| Object result = client.target(baseUrl + "/ldapGroupMappingService") |
| .post(javax.ws.rs.client.Entity.entity(ldapGroupMappingUpdateRequest, "application/xml"), Object.class); |
| |
| //handle the result as needed... |
| </pre> |
| </div> |
| </div> |
| </p> |
| <table class="table table-hover"> |
| <caption>Files</caption> |
| <thead> |
| <tr> |
| <th>name</th> |
| <th>size</th> |
| <th>description</th> |
| </tr> |
| </thead> |
| <tbody data-link="row" class="rowlink"> |
| <tr class="clickable-row" data-href="redback-rest-api-xml-client.jar"> |
| <td>redback-rest-api-xml-client.jar</td> |
| <td>13,82K</td> |
| <td>The binaries for the Java XML client library.</td> |
| </tr> |
| <tr class="clickable-row" data-href="redback-rest-api-xml-client-xml-sources.jar"> |
| <td>redback-rest-api-xml-client-xml-sources.jar</td> |
| <td>11,70K</td> |
| <td>The sources for the Java XML client library.</td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="artifact_js_client_library">JavaScript Client Library</h3> |
| <p class="lead">Created November 30, 2019</p> |
| <p><p> |
| 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"). |
| </p> |
| <p> |
| The library uses ES6 class syntax which has limited support. See |
| <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Browser_compatibility">MDN</a> |
| and the <a href="https://kangax.github.io/compat-table/es6/">ES6 Compatibility Table</a> |
| for more details. |
| </p> |
| <p> |
| The library contains a UMD loader which supports AMD, CommonJS and browser globals. |
| The browser global variable name for this library is "javascriptClient". |
| </p> |
| |
| <div class="panel panel-default"> |
| <div class="panel-heading">JavaScript Example</div> |
| <div class="panel-body"> |
| <pre class="prettyprint lang-js"> |
| //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); |
| </pre> |
| </div> |
| </div> |
| </p> |
| <table class="table table-hover"> |
| <caption>Files</caption> |
| <thead> |
| <tr> |
| <th>name</th> |
| <th>size</th> |
| <th>description</th> |
| </tr> |
| </thead> |
| <tbody data-link="row" class="rowlink"> |
| <tr class="clickable-row" data-href="redback-rest-api-javascript-client-js.zip"> |
| <td>redback-rest-api-javascript-client-js.zip</td> |
| <td>4,36K</td> |
| <td> </td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="artifact_ns0_xsd">ns0.xsd</h3> |
| <p class="lead">Created November 30, 2019</p> |
| <table class="table table-hover"> |
| <caption>Files</caption> |
| <thead> |
| <tr> |
| <th>name</th> |
| <th>size</th> |
| <th>description</th> |
| </tr> |
| </thead> |
| <tbody data-link="row" class="rowlink"> |
| <tr class="clickable-row" data-href="ns0.xsd"> |
| <td>ns0.xsd</td> |
| <td>9,27K</td> |
| <td> </td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="artifact_objc_client_library">Objective C Client Library</h3> |
| <p class="lead">Created November 30, 2019</p> |
| <p><p> |
| The Objective C module generates the source code for the Objective C classes and (de)serialization |
| functions that can be used in conjunction with <a href="http://xmlsoft.org/">libxml2</a> to (de)serialize |
| the REST resources as they are represented as XML data. |
| </p> |
| |
| <p> |
| The generated Objective C source code depends on the <a href="http://xmlsoft.org/html/libxml-xmlreader.html">XML Reader API</a> |
| and the <a href="http://xmlsoft.org/html/libxml-xmlwriter.html">XML Writer API</a> as well as the base OpenStep foundation classes. |
| </p> |
| |
| </p> |
| <table class="table table-hover"> |
| <caption>Files</caption> |
| <thead> |
| <tr> |
| <th>name</th> |
| <th>size</th> |
| <th>description</th> |
| </tr> |
| </thead> |
| <tbody data-link="row" class="rowlink"> |
| <tr class="clickable-row" data-href="redback-rest-api.h"> |
| <td>redback-rest-api.h</td> |
| <td>17,08K</td> |
| <td> </td> |
| </tr> |
| <tr class="clickable-row" data-href="redback-rest-api.m"> |
| <td>redback-rest-api.m</td> |
| <td>219,54K</td> |
| <td> </td> |
| </tr> |
| <tr class="clickable-row" data-href="enunciate-common.h"> |
| <td>enunciate-common.h</td> |
| <td>12,83K</td> |
| <td>Common header needed for all projects.</td> |
| </tr> |
| <tr class="clickable-row" data-href="enunciate-common.m"> |
| <td>enunciate-common.m</td> |
| <td>42,34K</td> |
| <td>Common implementation code needed for all projects.</td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3> |
| <p class="lead">Created November 30, 2019</p> |
| <p><p> |
| 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"). |
| </p> |
| |
| <p> |
| This library requires the <a href="http://php.net/manual/en/function.json-encode.php">json_encode</a> function which was included in PHP versions 5.2.0+. |
| </p> |
| |
| <div class="panel panel-default"> |
| <div class="panel-heading">PHP JSON Example</div> |
| <div class="panel-body"> |
| <pre class="prettyprint lang-php"> |
| //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(); |
| </pre> |
| </div> |
| </div> |
| </p> |
| <table class="table table-hover"> |
| <caption>Files</caption> |
| <thead> |
| <tr> |
| <th>name</th> |
| <th>size</th> |
| <th>description</th> |
| </tr> |
| </thead> |
| <tbody data-link="row" class="rowlink"> |
| <tr class="clickable-row" data-href="redback-rest-api-php-json-client-php.zip"> |
| <td>redback-rest-api-php-json-client-php.zip</td> |
| <td>4,79K</td> |
| <td> </td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3> |
| <p class="lead">Created November 30, 2019</p> |
| <p><p> |
| 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. |
| </p> |
| |
| <p> |
| This library leverages the <a href="http://php.net/manual/en/book.xmlreader.php">XMLReader</a> and |
| <a href="http://php.net/manual/en/book.xmlwriter.php">XMLWriter</a> tools that were included in PHP |
| versions 5.1.0+. |
| </p> |
| |
| |
| <div class="panel panel-default"> |
| <div class="panel-heading">PHP XML Example</div> |
| <div class="panel-body"> |
| <pre class="prettyprint lang-php"> |
| //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(); |
| </pre> |
| </div> |
| </div> |
| </p> |
| <table class="table table-hover"> |
| <caption>Files</caption> |
| <thead> |
| <tr> |
| <th>name</th> |
| <th>size</th> |
| <th>description</th> |
| </tr> |
| </thead> |
| <tbody data-link="row" class="rowlink"> |
| <tr class="clickable-row" data-href="redback-rest-api-php-xml-client-php.zip"> |
| <td>redback-rest-api-php-xml-client-php.zip</td> |
| <td>6,78K</td> |
| <td> </td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3> |
| <p class="lead">Created November 30, 2019</p> |
| <p><p> |
| 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"). |
| </p> |
| |
| <p> |
| This library leverages the <a href="http://json.rubyforge.org/">Ruby JSON Implementation</a>, which is |
| required in order to use this library. |
| </p> |
| |
| |
| <div class="panel panel-default"> |
| <div class="panel-heading">Ruby JSON Example</div> |
| <div class="panel-body"> |
| <pre class="prettyprint lang-ruby"> |
| 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... |
| </pre> |
| </div> |
| </div> |
| </p> |
| <table class="table table-hover"> |
| <caption>Files</caption> |
| <thead> |
| <tr> |
| <th>name</th> |
| <th>size</th> |
| <th>description</th> |
| </tr> |
| </thead> |
| <tbody data-link="row" class="rowlink"> |
| <tr class="clickable-row" data-href="redback-rest-api.rb"> |
| <td>redback-rest-api.rb</td> |
| <td>71,03K</td> |
| <td> </td> |
| </tr> |
| </tbody> |
| </table> |
| |
| <footer> |
| <div class="footer"> |
| Generated by <a href="http://enunciate.webcohesion.com">Enunciate</a>. |
| </div> |
| </footer> |
| |
| </div> |
| |
| </div> |
| |
| |
| <!-- JavaScript placed at the end of the document so the pages load faster. --> |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> |
| |
| |
| <!-- prettify code blocks. see http://code.google.com/p/google-code-prettify/ --> |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/run_prettify.js" type="text/javascript"></script> |
| |
| |
| </body> |
| </html> |