Tuesday, August 26, 2014

How to log the Content-Type in WSO2 ESB


To identify the Content-Type in the mediation in wso2 esb.
Please refer to configuration given below. I have modified the sample given in the wso2 esb


<sequence xmlns="http://ws.apache.org/ns/synapse" name="main">
<in>
<filter xmlns:ns="http://org.apache.synapse/xsd" source="get-property('To')" regex=".*/StockQuote.*">
<then>
<send>
<endpoint>
<address uri="http://localhost:9000/services/SimpleStockQuoteService"></address>
</endpoint>
</send>
</then>
<else></else>
</filter>
</in>
<out>
<log level="custom">
<property xmlns:ns="http://org.apache.synapse/xsd" name="Transport Header Detail" expression="get-property('transport', 'Content-Type')"></property>
</log>
<send></send>
</out>
</sequence>
view raw GetHeaderDetail hosted with ❤ by GitHub

No comments:

Post a Comment