Below are the typical issues (together with the solution), one faces when submitting requests to HTTP-based web services in Etlworks Integrator:
No detailed response in the log
If the HTTP request is executed with an error, but only the HTTP error code is displayed in the logs.
Solution: Add a more detailed message to the log. When configuring the HTTP connection, select the option Add Response to Exception Log.
Impossible to guess the URL
If a dynamic URL is used, it is impossible to figure out the actual URL for the request.
Solution: To add an actual URL to the log, when configuring the HTTP connection, select the option Add URL to Debug Log.
An HTTP Error code is in the response when it is actually a success
The web service returns an HTTP code that is, according to the standard, an error code for that specific HTTP method. However, it is actually a success for our web service.
Solution: Set exceptions from the standard HTTP error codes, when configuring the HTTP connection. Enter a comma-separated list of the exceptions in the Exceptions from Error Codes field. When an HTTP request is executed, the return code will be compared to the list of standard error codes, and the list of the exceptions. The error will be generated only if the code is not on either list.
An HTTP Success code is in the response but it is actually an error
The web service returns an HTTP code that is, according to the standard, a success code for the specific HTTP method. However, it is actually an error for our web service.
Solution: To set the HTTP codes that will be considered to be a success, when configuring the HTTP connection, enter a comma-separated list of the codes in the Success Codes field. When a HTTP request is executed, the return code is compared to the list of standard success codes, and the list of user-entered success codes. If the second list is not empty, only the codes from the second list will be considered a success.
Capture the response code from the HTTP call
If you enable the option "Save HTTP Code into Global Variable" when configuring the HTTP connection the system will capture the HTTP response code and store it in the thread-safe global variable
var httpCode = SystemConfig.instance().getContextProperties().