-
Notifications
You must be signed in to change notification settings - Fork 0
02. Introduction
The purpose of this document is to provide guidelines for using the Excel workbook TranslationTool_v1_2.xlsm (or later). The Excel workbook is a tool for translating T24 screen text to any local language, including right-to-left languages.
T24 browser (backoffice screens) uses OFS to communicate with T24 Server. In TAFJ, OFS can be run also directly as an HTTP-GET command from the address bar in a browser, if the address starts with:
http://linx101122t0m:8080/TAFJServices/services/OFSService/Invoke?Request=
(where the part starting with TAFJServices replaces the address of the Login screen starting with BrowserWeb). An example (it links to A t24 server, if you have access to it you can Ctrl-click on it):
http://linx101122t0m:8080/TAFJServices/services/OFSService/Invoke?Request=ENQUIRY.SELECT,/I/PROCESS,WILLEMA/123456/IL0010001,DATES.LIST
will return, when pasted in Internet Explorer or Firefox:
The excel tool uses this mechanism to execute the actions. It will execute an HTTP-GET request, and read the response. The VBA code for this is:
To read the response, it will load the ResponseText property of the request, and parse it to find the OFS response. You can find the code in the Excel tool when editing macro's, in the routine LaunchOFSCommandTAFJ in module1.
T24 browser (backoffice screens) uses OFS to communicate with T24 Server. In TAFJ, OFS can be run also directly as an HTTP-POST command, using Postman or any other API software, or through writing a program in any programming language, like Visual Basic for Applications, available in Excel.
The program should execute an HTTP request using (for example):
URL = http://localhost:8089/TAFJRestServices/resources/ofs
Request = ofsRequest=ENQUIRY.SELECT,,INPUTT/123456,DATES.LIST
Header = “Content-Type” = “application/x-www-form-urlencoded”
(where the URL part starting with TAFJServices replaces the address of the Login screen starting with BrowserWeb). This will return, in the HTTP Response:
{"ofsRequest":"ENQUIRY.SELECT,,INPUTT/123456,DATES.LIST","ofsResponse":"HEADER=\"Dates List\",@ID::Id/TODAY::Today/LAST.WORKING.DAY::Last Working Day/NEXT.WORKING.DAY::Next Working Day,\"Dates List\",\"AU0010001 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"AU0010001-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"EU0010001 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"EU0010001-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010001 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010001-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010002 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010002-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010003 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010003-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010004 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010004-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010005 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"GB0010005-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"NL0010001 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"NL0010001-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0010001 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0010001-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0020100 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0020100-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0020101 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0020101-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0020102 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"SG0020102-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"US0010001 \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\",\"Dates List\",\"US0010001-COB \"\t\"17 APR 2020\"\t\"16 APR 2020\"\t\"20 APR 2020\""}
The excel tool uses this mechanism to execute the actions. It will execute an HTTP-POST request, and read the response. The VBA code for this is:
Dim URS_R18 as string
Dim myRequest As MSXML2.XMLHTTP60
URL_R18 = "http://" & host & ":" & port & "/TAFJRestServices/resources/ofs"
Set myRequest = New MSXML2.XMLHTTP60
myRequest.Open "POST", URL_R18, False, JBossUser, JBossPwd
myRequest.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
myRequest.send "ofsRequest=" & OFSRequest
myResponse = myRequest.responseText
To read the response, it will load the ResponseText property of the request, and parse it to find the OFS response. You can find the code in the Excel tool when editing macro's, in the routine LaunchOFSCommandTAFJ in module1.
As you can see in the above example, when opening the HTTP connection, you need to pass a username and password. These are not the same as the T24 user/password that you have to provide inside the OFS command, and which is a user with which you can login to BrowserWeb, typically INPUTT/123456.
To access the Rest Services for TAFJ, you need a TAFJ application user, and that user needs to be created in the environment that you are targeting.
For local modelbanks, there are scripts for managing the users in the jBoss installation (typically “add-user” script in jboss/bin). Please see the appendix, section 7.1, for a detailed explanation on how to create such a user, in short the process should be to get it working on a UTP installation in Windows:
- Go to the directory /jboss/bin
- Run the command “add-user.bat”
- Select “b”
- Type username
- Type password
- In groups type “t24user,TAFJAdmin” in exact case
- When asked as a slave type no
There should be no need to restart jBoss after adding the user. If, after adding the user, you get the following response:
<html><head><title>Error</title></head><body>Unauthorized</body></html>
Then the user was not created correctly, or the T24 installation is not correct (typically, using an installer version, not a UTP-version).
The username and password need to be provided in the “installation” worksheet (see chapter 4)