I would like to check the availability and response time of a WSDL or SOAP service. How can I do this with PRTG?


Article Comments

? Note: The following content is deprecated. It is not allowed to enter XML in the Postdata field in the HTTP specific settings of the HTTP Advanced sensor anymore.

This article applies to PRTG Network Monitor 15.x.19 or later

Testing a WSDL or SOAP Service with PRTG

You can test the availability and response time of a WSDL or SOAP service by utilizing an HTTP Advanced sensor. After all, a SOAP request is at its core just an HTTP POST transaction with a few special options set.

To get it to work you need:

  • Service Endpoint/URL
  • SOAP Envelope
  • SOAP Version

If you have the WSDL, you can generate the SOAP envelope using a standard tool, for example the Membrane SOAP Client or the Eclipse SoapUI Plugin.

As an example, we will use a publicly available SOAP request that you can find in this Directory of Public SOAP Web Services: the StockQuoteWSDL.

http://www.webservicex.com/stockquote.asmx?WSDL

It defines the available operations and layout of the SOAP request.

Using a WSDL tool, you can create the following request:

Enlarge here.

The specific headers you need are:

Content-Type: text/xml
SOAPAction: http://www.webserviceX.NET/GetQuote

The Soap 1.1 Envelope

<s11:Envelope xmlns:s11='http://schemas.xmlsoap.org/soap/envelope/'>
  <s11:Body>
    <ns1:GetQuote xmlns:ns1='http://www.webserviceX.NET/'>
      <ns1:symbol>XXXX</ns1:symbol>
    </ns1:GetQuote>
  </s11:Body>
</s11:Envelope>


Set up the HTTP Advanced Sensor

To check the availability of your SOAP service with PRTG, these are the steps to follow:

  • Add the HTTP Advanced sensor to a device in your device tree.
  • Select the following HTTP Specific Settings:
    1. Request Method: POST
    2. Postdata: Paste in your SOAP Envelope.
    3. Content Type: Custom
    4. Custom Content Type: text/xml if you work with SOAP v1.1 or application/soap+xml if you work with SOAP v1.2. (To get a description of the differences between SOAP 1.1 and SOAP 1.2, you can have a look at this SOAP Web Service Tutorial.)

Enlarge here.

  • Select the following Advanced Sensor Data:
    1. Use Custom HTTP Headers: Choose the option Use custom HTTP headers
    2. Custom HTTP Headers: Paste in your SOAP action and the SOAP content type: SOAP Action: [Your SOAP Action] Accept: [Your SOAP Content Type].
      Note: It is important that you set the Accept: parameter because otherwise the system inserts Accepts: text/html, which does not give you the result you want. In our example, add the following SOAP Action and Accept parameters to the Custom HTTP Headers field:
SOAPAction: http://www.webserviceX.NET/GetQuote
Accept: application/soap+xml

Enlarge here.

  • Result Handling: Store the latest HTML result. This option allows you to see the actual content of the server's response for debug/troubleshooting. Enlarge here.


Look at the Results

To see what is returned as a result, take a look in the sensor log. PRTG usually saves the sensor logs in %PROGRAMDATA%\Paessler\PRTG Network Monitor\Logs (Sensors). The file(s) are called:

  • Result of Sensor xxxx: See the whole HTTP transaction.
  • Result of Sensor xxxx-A: See the response or answer, which is the raw SOAP return envelope.

This means that the actual return is XML Escape encoded like:

…<GetQuoteResult>&lt;StockQuotes&gt;&lt;Stock&gt;&lt;Symbol&gt;QQQ&lt;/Symbol&gt;&lt;Last&gt;104.15&lt;/Last&gt;…

If you want to check the content with a keyword to trigger a warning or error status, you have to use a literal match. In this example, we’re looking for the last price for the stock: <Last> which is XML Escaped as &lt;Last&gt;.

Therefore, take care of the following sensor settings:

  1. Require Keyword: Set sensor to warning if keyword is missing.
  2. Response Must Include: [Your Keyword], here: &lt;Last&gt;.

Enlarge here.


The HTTP Advanced sensor will also give you all the timing information for the SOAP service.

Enlarge here.


Oct, 2015 - Permalink

If this content is deprecated, what are the steps to monitor a Soap service.

Requirements: 1. Send post 2. Compare response to known good value


Jun, 2020 - Permalink

Unfortunately, we do not have any other guides for this. Perhaps you can create a script with which you can monitor the soap service.


Kind regards,
Sasa Ignjatovic, Tech Support Team


Jun, 2020 - Permalink