Service Health Check Sample for SOAP/JMS

A Service Health Check sample is provided in <TIBCO_HOME>/administrator/<version>/samples/healthcheck/HealthCheckForSOAP_JMS.

This folder contains the following files:

  • HealthCheck_SOAP_JMS.wsdl: concrete WSDL describing the Service Health Check contract provided by each ActiveMatrix SOAP/JMS service out-of-the-box. The WSDL describes the schema for the Service Health Check request and response in terms of all the elements and their attributes. The WSDL also includes Sample SOAP/JMS Bindings for SOAP Versions 1.1 and 1.2.
  • SampleProjectForSOAPJMS.zip: .zip file containing the sample DAA,SOAPJMS.daa and its corresponding SOA project. The application SOAPJMS consists of a SOAP/JMS Binding and Java Implementation Type (IT).

Prerequisites

Note: To configure the required queue and JNDI on EMS, refer to steps in the readme located in <TIBCO_HOME>/administrator/<version>/samples/healthcheck/HealthCheckForSOAP_JMS/SampleProjectForSOAPJMS/SOAPJMS.

Ensure that HermesJMS is bundled with SoapUI, which is required for SOAP/JMS testing.

Procedure

  1. Deploy the DAA SOAPJMS.daa (from SampleProjectForSOAPJMS.zip) in TIBCO ActiveMatrix Administrator UI to an ActiveMatrix Runtime Node.
  2. In the SoapUI, click Tools > HermesJMS.
  3. Create a ClasspathGroup in HermesJMS:
    1. Navigate to Actions > New > New Session.
    2. Click Providers tab.
    3. Right-click the Classpath Groups and click Add Group. Enter a Classpath group name.
    4. Right-click the Library and select Add JAR(s). Select all the jars from the ems installation folder. Browse the lib folder and select all available jar files. The lib folder is located at the <ems_home>/ems/<version no> directory.
    5. A window opens to scan the jars for JMS Connection Factories. Select Scan. Click Apply and OK.
    6. Restart HermesJMS.
  4. Create the session as mentioned in the following steps:
    1. Navigate to Actions > New > New Session.
    2. Enter the Session name. For example, EMS.
    3. Select the classpath group created at step 3 from the dropdown list beside Loader.
    4. Choose com.tibco.tibjms.TibjmsConnectionFactory as the Connection Factory Class.
    5. Right-click the canvas below Connection Factory and click Add property. Add serverUrl, userName and userPassword properties with appropriate values.
    6. Select Tibco EMS from the Plug In list.
    7. Right-click the canvas below Plug In and click Add property. Add serverURL, username and password properties with appropriate values. You can use the same values used for EMS Server configuration.
    8. Click Apply and OK to close the Preferences dialog box.
  5. Right-click the session EMS from the left side navigation pane and click discover. It is connected to ems server and all the destinations are listed. If dialog box opens to replace the current set of destinations for EMS, click Yes.
  6. Save settings and exit HermesJMS configuration tool. The HermesJMS configuration is stored typically in c:\.hermes folder. The hermes-config.xml file located in this folder is required for configuring SoapUI as explained in the next step.
  7. Adding JMS Endpoint to SoapUI project:
    1. In the SoapUI, create a new project and browse the wsdl from it.
    2. Expand the project and right-click on the interface. Select Add JMS Endpoint.
    3. Specify Hermes Configuration location. You need to specify the path of the folder .hermes. This folder is created under 'C:\' directory.
    4. Select session name. Select appropriate destinations from Send/Publish and Receive/Subscribe destination list, for this sample select soapjms.queue.
  8. Right-click service interface and select Generate TestSuite.
  9. Expand the generated test suite. Double-click operation name. Click JMS Headers. Select check box beside Add SoapAction as property.
  10. Execute the Service Health Check request from SoapUI.

    The Service Health Check response shows the health status of the participating entities.

    Note: You can configure multiple SOAP/JMS services with the same queue. Therefore, to ensure correct functioning of Service Health Check for SOAP/JMS services, configure dedicated queues for every service, to ensure unambiguous delivery of the Service Health Check request to the intended service.