In order to create a WebService in HATS begin from the HATS Projects view and follow these steps:
IO Template and Integration Objects
When you create an Integration Object from a macro or when HATS creates an Integration Object automatically when you save a macro, HATS uses Integration Object templates to create the Integration Object. These templates contain the Java code that is included in each Integration Object.
HATS enables you to modify how an Integration Object interacts with the underlying subsystems, at the Java code level, to perform additional functions.
Benefits of Implementing Exception Handling in IO Template
How HATS use Macro to create WebService
Exception Handling Logic
Logic of returning to MainMenu
Testing WebService Using SOAP UI.
This webserice has been tested using SOAP UI (SoapUI is a free and open source cross-platform Functional Testing solution for webservices)
Success Test Case
On the left side of the below picture request is being sent to a specific macro ( searchBoats in this case) and if macro at the backend runs fine then result output parameter will be populated as ‘success’ as shown in the below picture at the right hand side.
Fail Test Case
On the left side of the below picture request is being sent to a specific macro ( searchBoats in this case) and if any issue occurs in the macro and macro throws the time-out error then result output parameter will be populated as ‘fail’ as shown in the below picture at the right hand side.