Deploying 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
<wildfly_home>/modules/com/CTV/tmproject
. Directories com, CTV, andtmproject
are to be created in the order as mentioned in the path<wildfly_home>/modules/com/CTV/tmproject
.Note
If Java runtime environment version is 8 or above, then copy the
mysql-connectorjava-5.1.48.jar
file from the/SafeNetTokenization/Tokenization/lib/ext directory
to the<wildfly_home>/modules/com/CTV/tmproject/main
directory.For MySQL 8.0, the Java runtime environment version must be 8 or above.
Copy the following jar files to the
<wildfly_home>/modules/com/CTV/tmproject/main
directory.Select the following jar files from the
SafeNetTokenization/Tokenization/lib/ext
directory:bson-2.5.1.jar
jdbc-4.10.6.20151104.jar
mysql-connector-java-5.1.42-bin.jar or mysql-connector-java-5.1.48.jar
ojdbc7.jar
c3p0-0.9.5.4.jar
jtds- 1.2.8.jar
mchange-commons-java-0.2.11.jar
SafeNetTokenService-8.12.3.000.jar
SafeNetTVM.jar
sqljdbc41.jar
TVMInformix.jar
TVMMySQL.jar
TVMOracle.jar
TVMSQLServer.jar
Select the following jar files from the
SafeNetTokenization/IngrianJCE/lib/ext
directory:*
commons-lang3-3.1.jar
commons-collections4-4.1.jar
gson-2.1.jar
Ingrianlog4j- api-2.10.0.jar
Ingrianlog4j-core-2.10.0.jar
IngrianNAE-8.12.3.000.jar
Create an XML file named
module.xml
in the<wildfly_home>/modules/com/CTV/tmproject
directory, and copy the following content into themodule.xml
file:<?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.12.3.000.jar"/> <resource-root path="SafeNetTVM.jar"/> <resource-root path="gson-2.1.jar"/> <resource-root path="commons-lang3-3.1.jar"/> <resource-root path="commons-collections4-4.1.jar"/> <resource-root path="Ingrianlog4j-api-2.10.0.jar"/> --> <resource-root path="Ingrianlog4j-core-2.10.0.jar"/> <resource-root path="IngrianNAE-8.12.38.10.1.000.jar"/> <resource-root path="c3p0-0.9.5.4.jar "/> <resource-root path="jtds-1.2.8.jar"/> <resource-root path="mchange-commons-java-0.2.11.jar"/> <resource-root path="sqljdbc41.jar"/> <!-- <resource-root path="TVMOracle.jar"/> --> <!-- Uncomment this if using Oracle database --> <!-- <resource-root path="ojdbc7.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-5.1.42-bin.jar"/> --> <!-- Uncomment this if using MySQL database and runtime Java version is 7--> <!-- <resource-root path="mysql-connector-java-5.1.48.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-4.10.6.20151104.jar"/> --> <!-- Uncomment this if using Informix database --> <!-- <resource-root path="bson-2.5.1.jar"/> --> <!-- Uncomment this if using Informix database --> </resources>
Add the following content into the
standalone.xml
file.<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-Vconfiguration directory:
SafeNetToken.properties
andSfntDbp.properties
fromSafeNetTokenization/Tokenization/lib/ext
.IngrianNAE.properties
fromSafeNetTokenization/IngrianJCE/lib/ext
.
Update HostName, PortNumber, DatabaseName, and DatabaseType parameters in
SafeNetToken.properties
file.Update NAE_IP.1, NAE_Port, and Log_File parameters in
IngrianNAE.properties
file.Edit the
<wildfly_home>/bin/standalone.bat
file and set the JAVA_OPTS variable for the properties files copied to the CT-Vconfiguration directory 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.IngrianNAE_Properties_Conf_Filename="c:/CT-Vconfiguration/IngrianNAE.properties"
Restart the WildFly server.
Deploy the
SafeNetTokenization/Tokenization/restfulService/tmrest.war
file 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.7.8 binary distribution and extract axis2-1.7.8-war.zip to a directory referred as <axis_home>.
Extract <axis_home>/axis2.war file using the following command:
jar -xvf axis2.war
Delete the <axis_home>/axis2.war file.
Create SafeNetTokenizer/lib directory in the <axis_home>/WEB-INF/services directory.
Copy the SafeNetTokenizer.class file from SafeNetTokenization/Tokenization/lib/ext to the <axis_home>WEB-INF/services/SafeNetTokenizer/lib directory.
In the <axis_home> directory create the axis2.war file by running the following command:
jar -cvf axis2.war *
Deploy the <axis_home>/axis2.war file on the WildFly server.