Build the code samples

API Gateway provides several code samples that demonstrate the tasks described in this guide, such as adding a custom filter or adding a message listener to API Gateway. This topic describes how to build the code samples.

Build prerequisites

API Gateway is built with JDK 1.8. To avoid BadClassVersion errors that might arise when deploying your sample classes with the API Gateway, you must also build the code samples with JDK 1.8.

Build the samples

Complete the following steps to build the samples:

  1. Set the VORDEL_HOME and POLICYSTUDIO_HOME environment variables:
    • Set the VORDEL_HOME environment variable to point to the root of your Axway API Gateway installation. For example, if you installed API Gateway in C:\Axway7.6.2\apigateway, set VORDEL_HOME to this directory.
    • Set the POLICYSTUDIO_HOME environment variable to point to the root of your Policy Studio installation. For example, if you installed Policy Studio in C:\Axway7.6.2\policystudio, set POLICYSTUDIO_HOME to this directory.
  2. Set the JAVA_HOME and JUNIT_HOME environment variables:
    • Set the JAVA_HOME environment variable to point to the root of a JDK 1.8 installation (for example, C:\jdk1.8.0_07).
    • Set the JUNIT_HOME environment variable to point to the directory containing your JUnit JAR file. The required version is 4.8.2 (for example, junit_4.8.2.jar).
  3. Add Apache Ant to your PATH environment variable. For example, if Apache Ant is installed in C:\ant, add C:\ant\bin to your PATH. See the Apache Ant website for more information on Apache Ant.
  4. To build and run each sample, follow these steps:
    1. Change to the directory where the sample is installed. Each sample is installed under DEVELOPER_SAMPLES/SAMPLE_NAME (for example, DEVELOPER_SAMPLES/FilterInterceptorLoadableModule).
    2. Open the README.TXT file and follow the instructions to build and run the sample.

Description of samples

The following code samples are included:

Related topics

Install the code samples

Related Links