Posts

Showing posts from October, 2015

WSO2 ESB

WSO2 ESB Learnings To get HTTP Status code in a sequence <property name="httpSc"  expression="$axis2.HTTP_SC" /> Custom  Make Fault in WSO2 1. Build payload factory with ERROR_CODE and ERROR_MESSAGE set by ESB when error occurs in mediation. <payloadFactory media-type="xml">    <format>       <Errors xmlns="http://wso2.com/make/fault">          <Error>             <ErrorCode>$1</ErrorCode>             <ErrorMessage>$2</ErrorMessage>          </Error>       </Errors>    </format>    <args>       <arg evaluator="xml" expression="get-property('ERROR_CODE')" />       <arg evaluator="xml" expression="get-property('ERROR_MESSAGE')" />    </args> </payloadFactory> 2.Extract the "Errors" node and store in property as of type "OM" element. <property xm