The HTTP Response Code returned at the end of Stambia Web Services invocations can be fully customized.
- This is only available for the HTTP REST API
- Stambia DI Runtime S17.4.0 or higher
This should be used to use a specific HTTP Response code.
To return a specific HTTP response message, please refer to this article.
Configuration of the Process
Creation of the Process Parameters
First, create the Process Parameter that will contain the value of the HTTP Response Code.
Design it as usual, and set a default value to avoid the case where it wouldn't be filled during the Process execution
Configuration of the META-INF
Next, lead to the main Process Properties, and open the Meta-Inf tab.
Add in the box the following sample of code and replace it with your own settings:
<httpRestWebServiceProperties extractRequestInfo="true"> <responseCodeMapper parameterName="httpResponseCode" /> </httpRestWebServiceProperties>
|parameterName||The name of the Process Parameter that contains the HTTP Response Code value|
At the end of the Web Service invocation, the value contained in the specified Process Parameter will be use to set the HTTP Response Code returned to the user invoking the Web Service.