- 5 minutes to read

How to monitor a SOAP service

This is a complete end to end-user guide on how to call, and evaluate a response from an XML based SOAP service using a Temperature Converter from W3Schools

The Nodinite Web Service Monitoring Agent can perform a request and then evaluate the body from the HTTP response. Each Web Service configuration will eventually end up as a Resource in one or more Monitor Views where the currently evaluated state is presented.

SOAP Resources Example

Step 1: Add a new Application

Enter the name and a unique id per application.

Repeat as needed. The Nodinite Application features facilitates grouping and identififcation:
SOAP Application

Step 2: Add the SOAP Service to be monitored

  1. click the Add button:
    Add new Web Service

  2. Expand the empty entry by clicking on the accordion:
    Expand empty entry

Step 3: Basic tab

Next, you will name the configuration by editing the following fields from within the Basic tab:
Basic Tab

  1. Make sure the configuration is enabled (checked)
  2. Set the Display name to some logically good name, for example: Evaluate Temperature using a SOAP service
  3. Set the Description and provide some basic information that makes it easy for someone else to understand the purpose of your configuration, for example, Sample SOAP Service
  4. Select the Application you created in Step 1

Step 4: Advanced tab

Next, you will manage your time related thresholds, editing the following fields from within the Advanced tab:
Advanced Tab

  1. Set the Polling Interval to some value, for example, 3600 (This type of check does not need to be performed very often)
  2. Set the Request Timeout to some value, for example, 120.
  3. Check the Allow Retries checkbox
  4. Set the Number of retires to some value, for example, 3. A single missed call should not give you an alert for this type of check
  5. Set the Retry Status Code to OK, meaning that we ignore any errors during the retry period

Step 5: Request tab

Next, you will manage items related to the actual Request. This information is managed from within the Request tab:
Request Tab

  1. Enter the URI to the Web API, for example, https://www.w3schools.com/xml/tempconvert.asmx
  2. The method to use is usually POST
  3. Check the SOAP checkbox
  4. Enter the XML body to use as payload calling the SOAP service, for example
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <CelsiusToFahrenheit xmlns="https://www.w3schools.com/xml/">
      <Celsius>42</Celsius>
    </CelsiusToFahrenheit>
  </soap12:Body>
</soap12:Envelope>
  1. Set the Content-Type to application/soap+xml; charset=utf-8

Content-Type

If you omit the Content-Type HTTP header, the following error is usually the result:

UnsupportedMediaType
Expect the following evaluated error state when the Content-Type is missing/invalid

You will need to find out what is the proper Content-Type to use for your actual case

Step 6: Response tab

Next, you will manage some technical details about the response. This information is managed from within the Response tab:
Response Tab

  1. Set the Status Code to 200 which means OK

You should normally not need to add configuration on the performance for this type of check. Leave the checkboxes unchecked.

Step 7: Evaluate response body tab

Next, you will configure the evaluation of the HTTP response body part. This configuration is performed from within the Evaluate response body tab:
Evaluate response body

  1. Select the Expression Type Xpath
  2. Enter the following Expression:
/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='CelsiusToFahrenheitResponse']/*[local-name()='CelsiusToFahrenheitResult']

The XPath must use local-name() when the response has a namespace

  1. The expected result is 107.6, Use any other value to perform a negative test

XML SOAP Response

For reference, the XML for the SOAP response is provided below:

<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <CelsiusToFahrenheitResponse xmlns="https://www.w3schools.com/xml/">
      <CelsiusToFahrenheitResult>107.6</CelsiusToFahrenheitResult>
    </CelsiusToFahrenheitResponse>
  </soap12:Body>
</soap12:Envelope>

Step 8: Certificate tab

You may want to ensure that there are no problems with the certificates if your SOAP service is configured to use HTTPS.

You can configure Nodinite to give you an alert if there is a problem detected with the certificate used for HTTPS. The configuration for this evaluation is managed from within the Certificate tab:
Certfificate tab

  1. If you use a certificate, then check the Evaluate certificate checkbox, otherwise leave it unchecked
  2. Set the number of days before the certificate expires to get a Warning alert
  3. Set the number of days before the certificate expires to get an Error alert
  4. If you have a certificate, then you might want to enforce that it is always being used. Check Force the use of certificate checkbox if this is the case
  5. The main purpose of this check is to evaluate the SOAP service, leave the Allow connection for invalid certificates checkbox unchecked

Step 9: Authentication tab

In this example, there is no need to provide any authentication details since the service is not protected or authenticated in any way.
Authentication Tab

Step 10: Save configuration

Next, you must Save the configuration. Click the Save button and then you should see a message that the operation succeeded:
Save success

Step 11: Create a Monitor View and Configure alerts

Next, you should configure a Monitor View and select an appropriate Alarm Plugin to get the alert in the way you prefer. These steps are documented in the Add or manage Monitor View user guide.

Make sure to select the Resource that you named in step 3.


Next Step

Monitor Views

Add or manage a Monitoring Agent Configuration
Monitoring Agents
Administration
Monitoring Agents