Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
WSO2 ESB: Simple Sequence To Send A Static XML Response. Link: http://www.mmdemirbas.com/2013/04/wso2-esb-simple-sequence-to-send-static.html
<sequence xmlns="http://ws.apache.org/ns/synapse" name="main" trace="disable">
<in>
<log level="headers">
<property name="?" value="[main] in: started"/>
<property name="To" expression="get-property('To')"/>
<property name="PAYLOAD" expression="/*"/>
</log>
<script language="js"><![CDATA[
mc.setPayloadXML(<greeting>Hello World</greeting>);
]]></script>
<header name="To" action="remove"/>
<property name="NO_ENTITY_BODY" action="remove" scope="axis2"/>
<property name="RESPONSE" value="true"/>
<send/>
<log level="headers">
<property name="?" value="[main] in: ended"/>
<property name="PAYLOAD" expression="/*"/>
</log>
</in>
<out>
<log level="headers">
<property name="?" value="[main] out: started"/>
<property name="RESPONSE" expression="/*"/>
</log>
<send/>
<log level="headers">
<property name="?" value="[main] out: ended"/>
</log>
</out>
</sequence>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment