Skip to content

Instantly share code, notes, and snippets.

@edgars
Created May 22, 2015 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edgars/bc577ff49cbfc7b315b4 to your computer and use it in GitHub Desktop.
Save edgars/bc577ff49cbfc7b315b4 to your computer and use it in GitHub Desktop.
<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