Created
April 23, 2015 08:46
-
-
Save vanjikumaran/d38c4484ffc12ef04715 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <api xmlns="http://ws.apache.org/ns/synapse" name="TestApi" context="/TestContext"> | |
| <resource methods="POST GET"> | |
| <inSequence> | |
| <log level="custom"> | |
| <property name="Message Flow" value="Roovershof Plant Search API - IN"></property> | |
| <property name="HTTP_METHOD IS###########" expression="$axis2:HTTP_METHOD"></property> | |
| <property name="ip address" expression="get-property('axis2','REMOTE_ADDR')"></property> | |
| <property name="Authorization" expression="get-property('transport','Authorization')"></property> | |
| </log> | |
| <property name="TIME_IN" expression="get-property('SYSTEM_TIME')" scope="default" type="LONG"></property> | |
| <enrich> | |
| <source type="body" clone="true"></source> | |
| <target type="property" property="INIT_MSG_PAYLOAD"></target> | |
| </enrich> | |
| <call> | |
| <endpoint> | |
| <address uri="service1"></address> | |
| </endpoint> | |
| </call> | |
| <filter source="get-property('axis2', 'HTTP_SC')" regex="201"> | |
| <then> | |
| <clone continueParent="true"> | |
| <target> | |
| <sequence> | |
| <respond></respond> | |
| </sequence> | |
| </target> | |
| <target> | |
| <sequence> | |
| <enrich> | |
| <source type="property" clone="true" property="INIT_MSG_PAYLOAD"></source> | |
| <target type="body"></target> | |
| </enrich> | |
| <property name="REST_URL_POSTFIX" scope="axis2" action="remove"></property> | |
| <property name="messageType" value="application/json" scope="axis2"></property> | |
| <property name="HTTP_METHOD" value="POST" scope="axis2"></property> | |
| <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2" type="STRING"></property> | |
| <property name="OUT_ONLY" value="true" scope="default" type="STRING"></property> | |
| <send> | |
| <endpoint> | |
| <address uri="servicr2"></address> | |
| </endpoint> | |
| </send> | |
| </sequence> | |
| </target> | |
| </clone> | |
| </then> | |
| <else> | |
| <respond/> | |
| </else> | |
| </filter> | |
| </inSequence> | |
| </resource> | |
| </api> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment