Skip to content

Standalone Setup Details

Arun Kumar edited this page Feb 23, 2025 · 4 revisions

Table of Contents

Running Oxalis as Standalone Server
Alternate way to deploy Oxalis in Tomcat
Tomcat installation
Tomcat configuration for Oxalis
Verifying the installation
Oxalis Outbound Standalone folder structure for Plugin and Extensions


Running Oxalis as Standalone Server

Oxalis-NG can be run as standalone server with its integrated webserver.

The easiest way is to download the full server package from Maven Central OR Maven Repo (download latest version)

You can unzip this which results in the following directory structure:

 -bin
 -lib
 -conf
 -ext
 -inbound
 -plugin

Within the 'bin' directory you can start the server with the run.sh or run.bat command. All relevant artifacts are available in 'lib'. Place oxalis.conf in 'conf'. You can place extension module ('ext'), inbound extension in 'inbound' and additional plugins in 'plugin' directory

Start Oxalis-NG server in the normal way, either through run.sh or run.bat.

Alternate way to deploy Oxalis in Tomcat

First you should download the [oxalis-ng-war-1.0.0.warfile from this release page and put it a directory of your choice. Something like this: image

Make sure that Oxalis home directory .oxalis is already set and $OXALIS_HOME environment variable referencing Oxalis home directory. This directory must contain oxalis.conf file where all necessary configuration parameters are configured along with Oxalis Keystore.

Tomcat installation

First you need to download Tomcat and unzip the files to a directory.

image

Then you should set the CATALINA_BASE environment variable to the chosen installation folder.

Tomcat configuration for Oxalis

The next step is to create a folder named Catalina in the Tomcat conf directory.

cd conf
mkdir Catalina 

And inside the newly created Catalina folder - create a folder named localhost.

cd Catalina
mkdir localhost 

Inside this localhost folder - create a file named oxalis-ng.xml containing:

<?xml version="1.0" encoding="UTF-8"?>
<!-- For a default Tomcat setup, name this file 'oxalis-ng.xml' and place it in the following directory -->
<!-- $CATALINA_BASE/conf/Catalina/localhost/ -->

<!-- The Context element represents our application. -->
<!-- The 'docBase' attribute will define the main application to be run. -->
<!-- For more information see https://tomcat.apache.org/tomcat-10.1-doc/index.html -->

<Context docBase="C:\Oxalis-And-OpenPeppol\Oxalis\Oxalis-NG\oxalis-ng-war-1.0.0.war" >
    
   <!-- Optionally define the OXALIS_HOME environment variable  -->
   <Environment name="OXALIS_HOME" value="C:\OXALIS_HOME" type="java.lang.String" override="false" />
   
   <!-- Here we can add a list of additional resources to add to the application --> 
   <!-- For more information see https://tomcat.apache.org/tomcat-8.5-doc/config/resources.html -->
   <Resources className="org.apache.catalina.webresources.ExtractingRoot">
            
      <!-- Add the other dependencies of oxalis -->
      <!--
      <PreResources 
          base="/path/to/oxalis/dir" 
          className="org.apache.catalina.webresources.DirResourceSet"
          webAppMount="/WEB-INF/lib"
          readOnly="true" />
      --> 
      <!-- Add this resource after (this resourse wil override files found in 'Context') the one we defined in the context element        -->
	  <!--
      <PostResources
        base="C:\Oxalis-And-OpenPeppol\Oxalis\binary\oxalis-as4-7.0.0-dist\" 
        className="org.apache.catalina.webresources.DirResourceSet"
        webAppMount="/WEB-INF/lib"
        /> 
		  -->
		  
      <!-- The name 'PreResources' and 'PostResources' refers to whether the resources will be added before or after the resource we defined in the 'Context' element -->
      <!-- There is also 'JarResources' that will let us alter the content of the 'Context' resource itself -->
      <!-- the precedence only affects witch version to use in case multiple resources provide the same content (the latest element will win) -->
      
   </Resources>
</Context>

This is one of alternative of deploying Oxalis in Tomcat. Ensure that your file locations match with the paths in the XML. Now you are ready to start the Tomcat server.

Verifying the installation

The easiest way to see that the AS4 endpoint is up, and running is to visit its endpoint address. If we now visit localhost:8080/oxalis-ng/as4 we will be greeted with the message Hello AS4 world

Oxalis Outbound Standalone folder structure for Plugin and Extensions

Oxalis-NG Outbound Standalone folder structure will be something like this:

C:/Oxalis-And-OpenPeppol/Oxalis/Oxalis-NG/    <-- Base folder, we will run our commands from here
├── standalone/    <-- We will put our regular Oxalis-NG Standalone application here...
│   ├── oxalis-ng-standalone.jar
│   ├── posibly-other.jar
│   └── ...
└── ext/    <-- ...and our Ext/extension here
    ├── ext-1.jar
    ├── ext-2.jar
    └── ...

To run our combined application all we need to do is to run the following command (This command assumes we are standing in our base folder):

java -classpath "standalone/*;ext/*" network.oxalis.ng.Main [followd by the argument like -f c:\some-invoice.xml]

Clone this wiki locally