BizTalk Server: How to monitor HTTP, SOAP and REST web services endpoints
In the world of integration, web services play a crucial role. The majority of the modern day integration happens over web service built either using REST/JSON, SOAP/XML over HTTP. It’s very unlikely you’ll have an integration solution without some HTTP endpoints integration. Some examples include internal or external services to validate customer, credit card, process shipping etc.
When you are relying on external web endpoints, it becomes crucial to make sure the connected web endpoints are alive, responding quick enough, and in general, it’s healthy, otherwise your integration is going to be broken.
So how do you monitor your HTTP, SOAP, REST based web services endpoints you use in your BizTalk Server solution? BizTalk360 advanced web endpoints monitoring is the solution to the problem.
Here are some of the common scenarios you can achieve using BizTalk360 web endpoints monitoring.
- Monitor HTTP endpoint for status codes like 200, 202 etc making sure endpoint is not returning with errors like 404 or 500 statuses .
- Monitor your HTTP endpoint for response times. When you are dealing with legacy systems, it’s important to make sure they are fast enough. You may want to make sure the web service response time is not more than 5 seconds.
- Monitor your HTTP endpoints response to have a specific value in either an XML XPath location or JSON expression path. Example: You may be expecting customer orderid or purchase order number in the responses.
Let’s take a bit deeper look at some of the powerful capabilities of BizTalk360 web endpoints monitoring and see how it helps to address the above scenarios.
Simple HTTP response code check
This is the simplest monitoring check you can make on the HTTP endpoints, all you are interested in is to verify whether an HTTP endpoint (ex: SalesForce API, SAP REST API) etc are returning 200 or 202 back. Achieving this in BizTalk360 is pretty straight forward.
You just need to provide a friendly name and URL of the web endpoint as shown below.
Then in the response verification section, choose “Return Code Alerts” and specify the required condition. Ex: “response status code 200 must be present else throw an error” as shown in the below figure
Monitor for web services endpoints response times
As part of your integration solution, you may be connecting various legacy back-end web services and it’s important to make sure the web services respond in a timely fashion. If you consistently receive slow response performance it’s time to look into it. BizTalk360 makes it super simple to monitor the response times on any web endpoints. As shown in the below picture, you just need to specify what’s your error and warning thresholds
Monitoring for specific values in the response messages
This is where it gets really interesting and useful. When you are working with your integration solutions connecting to external web services, you typically deal with structured request and response messages like XML and JSON. Sometimes you may want to keep an eye on some specific values that are returned by the web services endpoints. Example: You would expect CUSTOMER id to come on the response send to a specific vendor (send port), if the CUSTOMER id is not in the response, probably you wanted to raise an alert.
The response keyword alert makes it seamless to perform such monitoring and it also comes with the great ability to work with XPath for XML/SOAP, JSON expressions for REST/JSON responses and simple plain text search for regular responses.
Let’s see some example scenarios here
JSON expression looks up: In the below example we are expecting customerid and po_number with specific values in the response, else we are treating it as warning
XPATH look up: if in case your response is in the XML format, you can simply use XML XPath expressions to look for specific values as shown below
Plain text look up: If in case you are working with unstructured response messages like flat files, EDI/HL7 messages coming from a web service endpoint and you wanted to look for some specific text in the response you can simply use the plain text response alert functionality as shown below
You might have noticed in the screenshot there are options to configure multiple checks in the response messages, an example you can check for HTTP response code, response time, and keyword looks all in the same validation. When you have multiple checks, BizTalk360 will validate all of them, and report the errors. If there are 3 warnings and 1 error, the error message will take precedence, if there are more errors the first error will take precedence.
Customization on web service endpoints request
So far in the article, we have seen all the response side monitoring based on various attributes like response code, time, and keyword alerts. It’s equally important to have the power to construct the required HTTP request. In reality, it’s not possible to simply ping the web services endpoints URL and get the response back, in real world scenarios the HTTP request might need additional parameters like proxy settings, specific HTTP headers, POST with some raw data instead of simple GET operation, and security credentials like username/password.
BizTalk360 web endpoints monitoring is designed keeping all these characteristics in mind. Let’s take a quick look at how you can configure various things
Adding Security
This is pretty straight forward process while configuring the HTTP request, you just specify the domain, username, and password configuration. The details will be stored in a secure way in the configuration database and used every time a request is made to the specific URL.
Adding proxy settings
Sometimes you may need to configure the proxy settings in order to reach an external web service endpoint URL. You can easily specify the proxy either at global level or for specific URL as shown below
Adding custom Querystring to HTTP GET operation
In some scenarios, you might need to pass additional query string parameters to a web service endpoint URL. Example: Order reference, unique customer id etc. You can easily configure those additional URL parameters as shown in the below picture
You can also notice there are few more options like choosing the HTTP version and content type parameter before you make the call.
POST message to web services endpoint with raw data
In some scenarios, the web service endpoints may not be a simple URL GET operation, instead, you might need to post the raw message and validate the response messages. Example: You might want to call a customer validation service posting the customer data. The below screen shot shows all the options you have to construct a rich HTTP post message with raw content, content-length calculation, content-type, and HTTP version.
Visualizing health of all web services endpoints
Once you have configured all the required web services end points, you can easily visualize the health of all of them in a single place. You can also click on the view summary icon to see if there are any errors or warning. You can modify the settings any time seamlessly
In this article, we demonstrated the powerful capabilities of BizTalk360 web service endpoint monitoring. There are various other functionalities in the BizTalk360 that makes it really unique and must-have the solution for anyone using BizTalk Server. You can try BizTalk360 in your own environment using the free trial.