Created
May 22, 2015 16:25
-
-
Save edgars/bc577ff49cbfc7b315b4 to your computer and use it in GitHub Desktop.
This file contains 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="ClimaAPIV2" context="/api/v2/clima"> | |
<resource methods="GET" uri-template="/{country}/{city}"> | |
<inSequence> | |
<log level="full"></log> | |
<property name="NO_ENTITY_BODY" scope="axis2" action="remove"></property> | |
<payloadFactory media-type="xml"> | |
<format> | |
<ws:GetWeather xmlns:ws="http://www.webserviceX.NET"> | |
<ws:CityName>$1</ws:CityName> | |
<ws:CountryName>$2</ws:CountryName> | |
</ws:GetWeather> | |
</format> | |
<args> | |
<arg evaluator="xml" expression="get-property('uri.var.city')"></arg> | |
<arg evaluator="xml" expression="get-property('uri.var.country')"></arg> | |
</args> | |
</payloadFactory> | |
<header name="Action" scope="transport" value="urn:GetWeather"></header> | |
<log level="full"></log> | |
<send> | |
<endpoint> | |
<address uri="http://www.webservicex.net/globalweather.asmx" format="soap11"></address> | |
</endpoint> | |
</send> | |
</inSequence> | |
<outSequence> | |
<log level="full"></log> | |
<property name="messageType" value="application/json" scope="axis2"></property> | |
<send></send> | |
</outSequence> | |
</resource> | |
</api> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment