Installing CT-V Java Web Services (REST/SOAP) on Wildfly
Deploying CT-V REST APIs on WildFly includes the following steps:
Access the modules directory of WildFly (
<wildfly_home>/modules).Create a directory named main in the
<wildfly_home>/modules/com/CTV/tmprojectdirectory. The directoriescom,CTV, andtmprojectshould be created in the order as mentioned in the path<wildfly_home>/modules/com/CTV/tmproject.Note
The JDBC drivers for the supported databases are no longer part of the CT-V package. Download the JDBC drivers compatible with your database and copy them to the
<wildfly_home>/modules/com/CTV/tmproject/maindirectory. Refer to the below table for the download links:Database Driver Name Download Link MySQL mysql-connector-j-x.x.x.jarMySQL website Informix jdbc-x.x.x.x.jarMaven repository Oracle ojdbc8-x.x.x.x.x.jarMaven repository SQL Server mssql-jdbc-x.x.x.jre8.jarMaven repository Copy the following jar files to the
<wildfly_home>/modules/com/CTV/tmproject/maindirectory.Jar files to be copied from the
SafeNetTokenization/Tokenization/lib/extdirectory:bson-5.1.0.jarc3p0-0.10.1.jarjtds-1.3.1.jarmchange-commons-java-0.3.1.jarSafeNetTokenService-8.13.2.000.jarSafeNetTVM.jarTVMInformix.jarTVMMySQL.jarTVMOracle.jarTVMSQLServer.jar
Jar files to be copied from the
SafeNetTokenization/IngrianJCE/lib/extdirectory:*
commons-lang3-3.14.0.jarcommons-collections4-4.4.jargson-2.10.1.jarlog4j-api-2.23.1.jarlog4j-core-2.23.1.jarCADP_for_JAVA-8.17.0.002.jar
Create an XML file named
module.xmlin the<wildfly_home>/modules/com/CTV/tmprojectdirectory, and copy the following content to themodule.xmlfile:<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.1" name="com.CTV.tmproject"> <dependencies> <module name="javaee.api"/> </dependencies> <resources> <resource-root path="SafeNetTokenService-8.17.0.002.jar"/> <resource-root path="SafeNetTVM.jar"/> <resource-root path="gson-2.10.1.jar"/> <resource-root path="commons-lang3-3.14.0.jar"/> <resource-root path="commons-collections4-4.4.jar"/> <resource-root path="log4j-api-2.23.1.jar"/> --> <resource-root path="log4j-core-2.23.1.jar"/> <resource-root path="CADP_for_JAVA-8.17.0.002.jar"/> <resource-root path="c3p0-0.10.1.jar "/> <resource-root path="jtds-1.3.1.jar"/> <resource-root path="mchange-commons-java-0.3.1.jar"/> <resource-root path="mssql-jdbc-x.x.x.jre8.jar"/> <!-- <resource-root path="TVMOracle.jar"/> --> <!-- Uncomment this if using Oracle database --> <!-- <resource-root path="ojdbc8-x.x.x.x.x.jar "/> --> <!-- Uncomment this if using Oracle database --> <!-- <resource-root path="TVMSQLServer.jar"/> --> <!-- Uncomment this if using SQL Server database --> <!-- <resource-root path="TVMMySQL.jar"/> --> <!-- Uncomment this if using MySQL database --> <!-- <resource-root path="mysql-connector-java-8.x.x.jar"/> --><!-- Uncomment this if using MySQL database and runtime Java version is 8 or above <!-- <resource-root path="TVMInformix.jar"/> --> <!-- Uncomment this if using Informix database --> <!-- <resource-root path="jdbc-x.x.x.x.jar"/> --> <!-- Uncomment this if using Informix database --> <!-- <resource-root path="bson-5.1.0.jar"/> --> <!-- Uncomment this if using Informix database --> </resources>Add the following content to the
standalone.xmlfile.<global-modules> <module name="com.CTV.tmproject" slot="main"/> </global-modules>Note
Ensure to uncomment the resource-root path for the database being used.
Create a directory where WildFly will be deployed. For example,
CT-Vconfiguration(c:/CT-Vconfiguration).Copy the following properties files to the
CT-Vconfigurationdirectory:SafeNetToken.propertiesandSfntDbp.propertiesfromSafeNetTokenization/Tokenization/lib/ext.CADP_for_JAVA.propertiesfromSafeNetTokenization/CADP_for_JAVA/lib/ext.
Update HostName, PortNumber, DatabaseName, and DatabaseType parameters in
SafeNetToken.propertiesfile.Update
NAE_IP.1,NAE_Port, andLog_Fileparameters in theCADP_for_JAVA.propertiesfile.Edit the
<wildfly_home>/bin/standalone.batfile and set theJAVA_OPTSvariable for the properties files copied to theCT-Vconfigurationdirectory as shown here.set JAVA_OPTS=%JAVA_OPTS% -Dcom.safenet.SafeNetToken_Properties_Conf_Filename="c:/CT-Vconfiguration/SafeNetToken.properties" -Dcom.safenet.SfntDbp_Properties_Conf_Filename="c:/CTVconfiguration/SfntDbp.properties" - Dcom.ingrian.security.nae.CADP_for_JAVA_Properties_Conf_Filename="c:/CT-Vconfiguration/CADP_for_JAVA.properties"Restart the WildFly server.
Deploy the
SafeNetTokenization/Tokenization/restfulService/tmrest.warfile on the WildFly server.
Deploying SOAP APIs on WildFly
Deploying CT-V SOAP APIs on WildFly includes the following steps:
Follow the Steps 1 through 10 as described in the section for the REST APIs.
Download axis2 version 1.8.2 binary distribution and extract
axis2-1.8.2-war.zipto a directory referred to as<axis_home>.Extract
<axis_home>/axis2.warfile using the following command:jar -xvf axis2.warDelete the
<axis_home>/axis2.warfile.Create
SafeNetTokenizer/libfolder in the<axis_home>/WEB-INF/servicesdirectory.Copy the
SafeNetTokenizer.classfile fromSafeNetTokenization/Tokenization/lib/extto the<axis_home>;WEB-INF/services/SafeNetTokenizer/libdirectory.In the
<axis_home>directory create theaxis2.warfile by running the following command:jar -cvf axis2.war *Deploy the
<axis_home>/axis2.warfile on the WildFly server.