04 Feb 2021 08:36 PM
I have an API that I need to write a HTTP synthetic monitor but to run the API I need to first get the access token from a soap request xml response. My Problem is how I can get the access token from an XML response. Can any one please share how I can capture data from xml response using the HTTP synthetic monitor script mode.
Solved! Go to Solution.
04 Feb 2021 10:55 PM
I don’t think Dynatrace will be able to make soap request but if you will have somehow XML response you should use post execution script.
response.getResponseBody()
using this method you will get whole string and you should be able to parse it at least using regex inside script.
Sebastian
05 Feb 2021 10:54 AM
SOAP requests can be made using HTTP Monitors. As Sebastian mentions, you can then use the post-execution script to get the response body and retrieve the access token. The access token can then be stored as a variable for use in other requests. You can find more information here
19 Oct 2021 12:48 PM
Can I get some example how to do that ?
19 Oct 2021 12:57 PM
Did you check the example in our documentation here?
05 Feb 2021 02:48 PM
Hi Sebatian and Hannah,
Thank you very much for your response. I was able to call the soap request using HTTP monitor and I also verified that the Access Token is in the response in xml format. I will do what you suggested to use regex.
Thanks again and I appreciate the help.
Teo
09 Mar 2021 04:37 AM
Hello teoderico_david, I also want to monitor a soap request using http monitor, can you tell me the procedure you performed, I would be very grateful for your support.