Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <api xmlns="http://ws.apache.org/ns/synapse" name="Cale-StreetsAPI" context="/Cale-StreetsAPI">
- <resource methods="GET" uri-template="/getStreets?lat={lat}&lon={lon}&radius={radius}">
- <inSequence>
- <property name="aggRoot" scope="default">
- <red:jsonObject xmlns:red="redora"/>
- </property>
- <log description="">
- <property name="lat" expression="get-property('uri.var.lat')"/>
- <property name="lon" expression="get-property('uri.var.lon')"/>
- <property name="radius" expression="get-property('uri.var.radius')"/>
- </log>
- <clone continueParent="true" id="deCartaStreets">
- <target>
- <sequence>
- <sequence key="DeCartaDDS"/>
- </sequence>
- </target>
- <target>
- <sequence>
- <sequence key="DeCartaReverseGeo"/>
- </sequence>
- </target>
- </clone>
- </inSequence>
- <outSequence>
- <property name="messageType" value="application/xml" scope="axis2" type="STRING" description="messageType"/>
- <log level="full" description="">
- <property name="WSANSWER" value="true"/>
- </log>
- <aggregate>
- <completeCondition>
- <messageCount min="2" max="-1"/>
- </completeCondition>
- <onComplete expression="$body/jsonObject">
- <enrich>
- <source clone="true" xpath="$body//jsonObject"/>
- <target type="property" property="ResultItems"/>
- </enrich>
- <log level="custom">
- <property name="ResultItems" expression="get-property('ResultItems')"/>
- </log>
- <enrich>
- <source type="inline" clone="true">
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <soapenv:Header/>
- <soapenv:Body>
- <JsonResponse xmlns="dummy"/>
- </soapenv:Body>
- </soapenv:Envelope>
- </source>
- <target type="envelope"/>
- </enrich>
- <enrich>
- <source type="property" clone="true" property="ResultItems"/>
- <target xmlns:red="dummy" action="child" xpath="//red:JsonResponse"/>
- </enrich>
- <log level="full" description="">
- <property name="AGGREGATE_END" value="true"/>
- </log>
- <property name="messageType" value="application/json" scope="axis2" type="STRING" description="messageType"/>
- <send/>
- </onComplete>
- </aggregate>
- </outSequence>
- <faultSequence>
- <log level="full" category="WARN"/>
- </faultSequence>
- </resource>
- </api>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement