JavaServer pages tutorial
A tutorial that walks you through some of the system web service JavaServer pages.
Procedure
- In WorldServer, go to Tools > Translation Memories.
- Select an existing translation memory (TM).
- Using the Standard search type, identify a source language, two target languages, and some Search For terms and Minimum Score % percentages that return a couple of TM entries.
Tip: Write down a value for each. You will need them in later steps.
- Go to Tools > Term databases.
- Select an existing term database (TD).
- Identify a Search In language and a Search For term that return a couple of TM entries.
Tip: Write down a value for each. You will need them in later steps.
- In your browser's address bar, enter the following, and then select Enter: http://<ws-host>:<ws-port>/ws-legacy/webservices/WSContext/Main.jsp, where <ws-host> is the name or IP address of the machine on which WorldServer is installed and <ws-port> is the number of the port on which WorldServer is installed.
- Under Methods, select loginUser(String, String).
- Enter your user name and password in the appropriate boxes, and then select Invoke.
The method is executed.
- Under Result, in the Object column, select WSContext.
- On the WorldServer Services page, select TmManager Service.
- Under Methods, select getAllTms(), and then, under Parameters, select Invoke.
- Under Result, in the Object column, select tm.WSTm in the row corresponding to the TM that you selected in step 2.
- Under Methods, select lookupSubstring(String, linguistic.WSLanguage, linguistic.WSLanguage, double).
- Under Parameters, in the searchText, sourceLanguage, targetLanguage, and minimumScore boxes, enter the values that you wrote down in step 3.
Tip: Enter the languages exactly as they appear on the WorldServer user interface. For example, Chinese (PRC).
- Select Invoke.
The TM results for the standard lookup of your search text are displayed under Result.
- Under Methods, select searchFreeform(String, linguistic.WSLanguage, linguistic.WSLanguage, int).
- Under Parameters, in the freeformQuery, sourceLanguage, targetLanguage, and maxResults boxes, enter the values that you wrote down in step 3.
Tip: Enter the languages exactly as they appear on the WorldServer user interface. For example, Chinese (PRC).
- Select Invoke.
The TM results for the freeform SQL wildcard query of your search text are displayed under Result.
- On the upper-right side of the Parameters frame, select Services to return to the WorldServer Services page.
- On the WorldServer Services page, select TdManager Service.
- Under Methods, select getTds(), and then, under Parameters, select Invoke.
- Under Result, in the Object column, select td.WSTd in the row corresponding to the TD that you selected in step 5.
- Under Methods, select lookupWithWildcards2(String, linguistic.WSLanguage, linguistic.WSLanguage).
- Under Parameters, in the termPattern, language, and targetLanguage boxes, enter the values that you wrote down in step 6.
Note: The term that you enter in the termPattern box must be preceded and followed by a asterisk (*). For example, *cocoa*.
- Select Invoke.
The TD results that contain your search term are displayed under Result.