Implementing Exception Handling In Integration Objects Template

In order to create a WebService in HATS begin from the HATS Projects view and follow these steps:
  1. Expand the project that contains the Integration Objects you intend to use, then expand the Source folder and the IntegrationObject folder.
  2. Right-click any Integration Object in your project and select Create Web Service Support Files.
  3. The Create Web Service Support Files wizard enables you to select any project as the source of the Integration Objects you will include in a Web service. The project in which you clicked will be the default. Provide a class name for the HATS Web service support files. The class name must begin with an uppercase letter. This class is referred to as your wrapper class for this Web service. This wrapper class enables you to select a logical group of Integration Objects or EJB Access Beans to include in one Web service. For example, you might select to include all the Integration Objects in a chain in the wrapper class. To see a list of Integration Objects and select the ones to include, click Next.
  4. Select the resources (Integration Objects and EJB access beans) that you want to include in your Web service, then click Finish. HATS creates a set of classes to be used in creating the Web service.
  5. Click the Navigator tab to open the Navigator view of your resources. Expand your project, then expand Java Source and webServiceClasses. Right-click the wrapper class that you created, and select Web Services > Create Web service. The Web service type defaults to "Bottom up Java bean Web service." Make sure that you keep this default. You can click Finish here or select other options that best meet your requirements, as described in the Rational SDP documentation. When you have made all your choices, click Finish. Rational SDP creates a Web Services Description Language (WSDL) file that describes the interfaces to your Web service.
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
  1. Implementing the Exception Handling logic in IO template can ease the job and once code is written in IO template then it can be applied in all the Integration Objects.
  2. Now developer needs to focus fully on macro development, Excepting Handling will all be handled by IO Template.
How HATS use Macro to create WebService clip_image002.jpg Exception Handling Logic
  1. Define exact screen recognition for every screen base on happy flow scenario.
  2. In any exception scenario system will wait for time out (default 60 secs) and after expiring the time out time control will transfer to Exception Handling framework.
  3. Exception Handling Framework will automatically return to First Screen and thus gracefuly sign out.
Logic of returning to MainMenu
  1. If match “Enter to Continue”, send [enter]
  2. Else if find “F3=xxxxxx” send [PF3] // PF3 key or any other key used for exit
  3. Else if find “F12=xxxxx” send [PF12] // PF12 key or any other key used for cancel
  4. Until First Screen is found.
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. clip_image004.jpg 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. clip_image006.jpg

Leave a Reply