Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <api xmlns="http://ws.apache.org/ns/synapse" name="Cale-StreetsAPI" context="/Cale-StreetsAPI">
  3. <resource methods="GET" uri-template="/getStreets?lat={lat}&lon={lon}&radius={radius}">
  4. <inSequence>
  5. <property name="aggRoot" scope="default">
  6. <red:jsonObject xmlns:red="redora"/>
  7. </property>
  8. <log description="">
  9. <property name="lat" expression="get-property('uri.var.lat')"/>
  10. <property name="lon" expression="get-property('uri.var.lon')"/>
  11. <property name="radius" expression="get-property('uri.var.radius')"/>
  12. </log>
  13. <clone continueParent="true" id="deCartaStreets">
  14. <target>
  15. <sequence>
  16. <sequence key="DeCartaDDS"/>
  17. </sequence>
  18. </target>
  19. <target>
  20. <sequence>
  21. <sequence key="DeCartaReverseGeo"/>
  22. </sequence>
  23. </target>
  24. </clone>
  25. </inSequence>
  26. <outSequence>
  27. <property name="messageType" value="application/xml" scope="axis2" type="STRING" description="messageType"/>
  28. <log level="full" description="">
  29. <property name="WSANSWER" value="true"/>
  30. </log>
  31. <aggregate>
  32. <completeCondition>
  33. <messageCount min="2" max="-1"/>
  34. </completeCondition>
  35. <onComplete expression="$body/jsonObject">
  36. <enrich>
  37. <source clone="true" xpath="$body//jsonObject"/>
  38. <target type="property" property="ResultItems"/>
  39. </enrich>
  40. <log level="custom">
  41. <property name="ResultItems" expression="get-property('ResultItems')"/>
  42. </log>
  43. <enrich>
  44. <source type="inline" clone="true">
  45. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  46. <soapenv:Header/>
  47. <soapenv:Body>
  48. <JsonResponse xmlns="dummy"/>
  49. </soapenv:Body>
  50. </soapenv:Envelope>
  51. </source>
  52. <target type="envelope"/>
  53. </enrich>
  54. <enrich>
  55. <source type="property" clone="true" property="ResultItems"/>
  56. <target xmlns:red="dummy" action="child" xpath="//red:JsonResponse"/>
  57. </enrich>
  58. <log level="full" description="">
  59. <property name="AGGREGATE_END" value="true"/>
  60. </log>
  61. <property name="messageType" value="application/json" scope="axis2" type="STRING" description="messageType"/>
  62. <send/>
  63. </onComplete>
  64. </aggregate>
  65. </outSequence>
  66. <faultSequence>
  67. <log level="full" category="WARN"/>
  68. </faultSequence>
  69. </resource>
  70. </api>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement