Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2016
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <api context="/test" name="test" xmlns="http://ws.apache.org/ns/synapse">
  3. <resource methods="GET">
  4. <inSequence>
  5. <property name="ROOT" scope="default">
  6. <root:movie xmlns:root="www.wso2esb.com"/>
  7. </property>
  8. <property name="uri.var.id" scope="default" type="STRING" value="tt0418279"/>
  9. <dbreport description="">
  10. <connection>
  11. <pool>
  12. <password>regadmin</password>
  13. <driver>com.mysql.jdbc.Driver</driver>
  14. <url>jdbc:mysql://localhost:3306/regdb</url>
  15. <user>regadmin</user>
  16. </pool>
  17. </connection>
  18. <statement>
  19. <sql><![CDATA[insert into tracker (`id`, `query`, `tracked`) values (NULL, ?, NOW())]]></sql>
  20. <parameter expression="get-property('uri.var.id')" type="VARCHAR"/>
  21. </statement>
  22. </dbreport>
  23. <clone continueParent="true" id="movie" sequential="true">
  24. <target>
  25. <sequence>
  26. <send>
  27. <endpoint>
  28. <http format="rest" uri-template="http://api.themoviedb.org/3/movie/{uri.var.id}?api_key=code&amp;append_to_response=casts,images"/>
  29. </endpoint>
  30. </send>
  31. </sequence>
  32. </target>
  33. <target>
  34. <sequence>
  35. <send>
  36. <endpoint>
  37. <http format="rest" uri-template="https://www.omdbapi.com/?type=movie&amp;i={uri.var.id}"/>
  38. </endpoint>
  39. </send>
  40. </sequence>
  41. </target>
  42. </clone>
  43. </inSequence>
  44. <outSequence>
  45. <aggregate id="movie">
  46. <completeCondition>
  47. <messageCount max="-1" min="-1"/>
  48. </completeCondition>
  49. <onComplete enclosingElementProperty="ROOT" expression="//jsonObject/*" xmlns:dummy="http://org.dummy" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  50. <log level="full"/>
  51. <datamapper config="gov:datamapper/TestMapping.dmc" inputSchema="gov:datamapper/TestMapping_inputSchema.json" inputType="XML" outputSchema="gov:datamapper/TestMapping_outputSchema.json" outputType="XML"/>
  52. <send/>
  53. </onComplete>
  54. </aggregate>
  55. </outSequence>
  56. <faultSequence/>
  57. </resource>
  58. </api>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement