The provided sample command-line driver can be used to experiment using REST from the command-line.

The command-line driver was written as proof of concept to demonstrate use of the REST API, and is not intended as a primary way of interacting with it.

Source code for the command-line driver is available as an IntelliJ/Maven project in a Bitbucket repository - Please customize as needed. This client doesn’t use ‘model’ POJOs corresponding to requests and responses in the API. Instead it processes responses as Strings and use XPath to process results.

For example:

$ java -jar deltaxml-dita-compare-client-1.0.0.jar compare resources/personA.xml 
  resources/personB.xml resources/person-config.xml resources/result.xml
Dita Compare REST command-line driver. (C) 2019 DeltaXML Ltd. All rights reserved.

               Inputs Loading -'input-a'
               Inputs Loading -'input-b'
               Comparison in progress
               Output processing in progress
Results written to resources/result.xml

The client defaults to http://localhost:8080 but this can be changed by using the host property.

For example, if the REST service is running on port 1234 instead of 8080:

java -Dhost=http://localhost:1234 -jar deltaxml-dita-compare-client-1.0.0.jar

In these samples, references to the deltaxml-dita-rest-client-1.0.0.jar should be modified to match the major.minor.patch version of DITA Compare you are using.

Also, if using a Windows terminal, the '\' line-continuation character should be replaced with '^' character.