Hi there AppWorks fans,
Welcome to a new installment of AppWorks tips.
This time a post on the AppWorks Gateway. This is a separate web application that makes it possible to use the mobile app building blocks that are available on an entity. The usage of the mobile building blocks will be covered in the next post. For now, we only focus on the preparation for making the Gateway available for our AppWorks platform.
First the list of ingredients that we need (We have it all available already on our current VM via the OTDS installation post running on port 8181):
- Tomcat (with PostgreSQL client)
- PostgreSQL database
Let get right into it…
Several steps need to be executed before we can use the Gateway service. Spin up your VM machine and make sure you have a session open from your MobaXTerm tooling.
Now for our first step….
Login to the VM with our ‘otadmin’ account and run these simple commands:
sudo -u postgres psql
CREATE DATABASE gateway_db;
\qto exit the console
The second step is to update some settings on the current tomcat instance. Yes…the one where we also deployed OTDS on!
Note and lesson learned!
After some playtime with the Gateway it’s better to make a separate tomcat instance for the Gateway application. In my environment I got some OTDS connection errors on my deployed apps! So, I just followed the tomcat installation (for OTDS) post on this site (search for it) and made a second tomcat available in /opt/tomcat2 on port 8282 and referred to it from for all the gateway settings in this post.
And after reading the ‘Gateway Installation and Administration Guide’ I also get the point!
Just to make sure: You might see some screenshots where I point to http://192.168.56.107:8181 as the Gateway endpoint, but I have 2 tomcat instances running!
- OTDS runs on http://192.168.56.107:8181
- AppWorks gateway runs on http://192.168.56.107:8282
- And then I have http://192.168.56.107:8080 for the platform itself on TomEE!
Let’s continue the journey…
- First stop the Gateway tomcat instance
systemctl stop tomcat
- Edit the server.xml
vi /opt/tomcat/latest/conf/server.xmlwith these 2 updates:
<Connector ... useSendfile="false"/>
- Then we have a second file to edit
vi /opt/tomcat/latest/conf/context.xmlwith this update:
<Context antiResourceLocking="true" crossContext="true">
Next, we make the PostgreSQL JDBC driver (a .jar file) also (a copy from TomEE) available on the tomcat instance
cp /opt/tomee/latest/lib/postgresql-42.2.5.jar /opt/tomcat/latest/lib/postgresql-42.2.5.jar
And then we upload the installation files to
/opt/tomcat/latest. These files are available in the downloaded AppWorks Suite we also used for the installation of CARS/AppWorks itself.
- ‘lib’ to ‘’/opt/tomcat/latest/lib’
- With 2 jars; otag-sdk-bus-16.5.6.jar and otag-tomcat-listener-16.2.jar
- ‘gateway’ to ‘/opt/tomcat’ (this is the webapp…and yes into the root of the tomcat instance!)
- ‘conf’ to ‘/opt/tomcat/latest/conf’ (skip the context.xml and server.xml as they are already updated in the first steps above!)
- It uploads the ‘awg-keystore’ file
- The ‘Catalina’ folder has a ‘root.xml’ file that points to the ‘gateway’ webapp (the one we copied in the tomcat root…remember?)!
- ‘lib’ to ‘’/opt/tomcat/latest/lib’
Now we can start tomcat again with
systemctl start tomcat
See if OTDS is still available
And see if our gateway is available on
The first time you get redirected to
Select what your intention is with the gateway…I know…it’s Dutch, but you recognize the ‘evaluation’ part…agree?
And hit the blue ‘Doorgaan’ button…Again Dutch…You’ll learn some Dutch words today!
The next screen requires you to update 2 parts
Databaseleverancier: PostgreSQL (this is where the copied jar will be used!)
Gebruikersnaam: postgres (our PostgreSQL admin account)
Wachtwoord: admin (used for my image, but you can define your own!)
Server: 192.168.56.107 (our regular image where PostgreSQL is running)
Poort: 5432 (The default PostgreSQL port)
Naam database: gateway_db (our just created database!)
Click the blue ‘Databaseverbinding configureren’ button to get back a black mark!
- Gateway-beheerdergebruikersnaam: otag (the default; stands for OpenTextAppworksGateway)
- Gateway-beheerderswachtwoord: admin (self defined)
- OTDS-server-URL: http://192.168.56.107:8181
- OTDS-gebruikernaam: email@example.com (we use the account already for the otds-admin console!)
- OTDS-wachtwoord: admin
- Bronnaam: OTAG (the default)
- Gateway-gebruikerpartitienaam: otag (the default)
And click the ‘OTDS configureren’ button.
When all fine you should be redirected to the gateway login screen
You can login with the just configured ‘otag’ account and password ‘admin’
After this login you’ll start on the first landing page for the gateway.
And this screen is in English…what?…yes…I switched to an English IE for your convenience! 😜
We’ll leave this screen for what it is for now, but ‘We’ll be back’ later…
For this we need to open our CMC tooling!…It’s the one where we need to set our display variable with
export DISPLAY=<IP:0.0> and start it with
Add these 5 new properties with the corresponding values:
The password is a base64 encryption of ‘admin’. Go here to encode/decode your string value!
The last OTDSResource property can be found in the otds-admin console
The last step is to restart our AppWorks platform:
systemctl restart wcpddefaultInst.service
sudo cat /opt/opentext/AppWorksPlatform/defaultInst/Logs/Monitor.xml
And the real last/final step is the make OTDS ‘know’ that our Gateway is running in a non-secure HTTP connection…For our environment it’s fine!
So, go to the otds-admin console (http://192.168.56.107:8181/otds-admin/#systemconfig) where we open the ‘System Config’
And we’ll add a new attribute with this information:
A tomcat restart can be done but is not required for now. It will already be restarted somewhere when we get to our next post probably!…otherwise
systemctl restart tomcat
And that brings us to a ‘DONE’ for this post where we learned more about making a Gateway instance available for our AppWorks platform. Not that hard to do and it makes valuable functionality available that we will describe in our next post…Have a nice day and I see you in the next one…Greetz!