Welcome Guest! Log in
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…


The HTTP Response Code returned at the end of Stambia Web Services invocations can be fully customized.

Prerequisites:
  • This is only available for the HTTP REST API
  • Stambia DI Runtime S17.4.0 or higher

 

Note:

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

1.createParameter

 

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>

 

Attribute Description
parameterName The name of the Process Parameter that contains the HTTP Response Code value

 

Usage

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.

 

Articles

Suggest a new Article!