WSO2 EI/ESB Change Backend Response Status Code

With WSO2 Enterprise Integrator or Enterprise Service Bus servers, if you want to change the backend server response code, you can set custom status status code as below:

 <property name="HTTP_SC" scope="axis2" type="STRING" value="403"/>

If you are getting 'HTTP/1.1 202 Accepted' response from your backend, you need to set "SC_ACCEPTED" as false by setting a custom SC_ACCEPTED

Ex:  Receiving 202 from backend and change it to 200

<filter regex="202" source="$axis2:HTTP_SC">
        <then>
            <property action="remove" name="HTTP_SC" scope="axis2"/>
            <property name="SC_ACCEPTED" scope="axis2" value="false"/>
            <property name="HTTP_SC" scope="axis2" type="STRING" value="200"/>
        </then>
        <else/>
    </filter>


Comments

Danny Cooper said…
Thank you for sharing such a useful article. I had a great time. This article was fantastic to read. Continue to publish more articles on

Data Engineering Services 

Data Analytics Solutions
gailenjaili said…
Jammin' Jars Slots Casino Games - JTM Hub
Jammin Jars 속초 출장샵 Slots Casino Games · 제천 출장안마 Casino games in your 순천 출장마사지 browser: · 용인 출장안마 Slots · Video slots · Casino games in your browser · Play 태백 출장마사지 Jammin Jars Slots Casino Games.

Popular posts from this blog

Yield Price Sri Lanka - Android Application

Building a RESTFul Service using Spring Boot

XSLT - Modify Date and DateTime value