Advertisement
Guest User

Untitled

a guest
Aug 19th, 2016
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <api context="/example" name="example" 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. <clone continueParent="true" id="movie" sequential="true">
  10. <target>
  11. <sequence>
  12. <send>
  13. <endpoint>
  14. <http format="rest" uri-template="http://api.themoviedb.org/3/movie/{uri.var.id}?api_key=KEY&amp;append_to_response=casts,images"/>
  15. </endpoint>
  16. </send>
  17. </sequence>
  18. </target>
  19. <target>
  20. <sequence>
  21. <send>
  22. <endpoint>
  23. <http format="rest" uri-template="https://www.omdbapi.com/?type=movie&amp;i={uri.var.id}"/>
  24. </endpoint>
  25. </send>
  26. </sequence>
  27. </target>
  28. </clone>
  29. </inSequence>
  30. <outSequence>
  31. <aggregate id="movie">
  32. <completeCondition>
  33. <messageCount max="-1" min="-1"/>
  34. </completeCondition>
  35. <onComplete enclosingElementProperty="ROOT" expression="//jsonObject/*" xmlns:dummy="http://org.dummy" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  36. <log level="full"/>
  37. <datamapper config="conf:myresources/exampleMap.dmc" inputSchema="conf:myresources/exampleInput.dmc" inputType="XML" outputSchema="conf:myresources/exampleOutput.dmc" outputType="JSON"/>
  38. <log level="full"/>
  39. <send/>
  40. </onComplete>
  41. </aggregate>
  42. </outSequence>
  43. <faultSequence/>
  44. </resource>
  45. </api>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement