Advertisement
Guest User

Untitled

a guest
Sep 14th, 2017
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. EndpointContext Endpoint : AnonymousEndpoint with address http://10.5.222.192:8282/updateAccountAmmount will be marked SUSPENDED as it failed.
  2.  
  3. <payloadFactory media-type="json">
  4. <format>{
  5. "accountId":$1,
  6. "ammount":$ctx:finalAmount
  7. }</format>
  8. <args>
  9. <arg evaluator="json" expression="$.accountTo"/>
  10. </args>
  11. </payloadFactory>
  12. <log level="full">
  13. <property name="message" value="start calling api full logs"/>
  14. </log>
  15. <call>
  16. <endpoint>
  17. <http format="rest" method="POST" uri-template="http://10.5.222.192:8282/updateAccountAmmount"/>
  18. </endpoint>
  19. </call>
  20. <log level="full">
  21. <property name="message" value="result"/>
  22. </log>
  23. </inSequence>
  24. <outSequence/>
  25. <faultSequence>
  26. </faultSequence>
  27. </resource>
  28. </api>
  29.  
  30. <?xml version="1.0" encoding="UTF-8"?>
  31. <api context="/updateAccountAmmount" name="updateAccountAmmount" xmlns="http://ws.apache.org/ns/synapse">
  32. <resource methods="POST">
  33. <inSequence>
  34. <log level="full">
  35. <property name="message" value="enter to the transfer of the money process"/>
  36. </log>
  37. <property expression="json-eval($.ammount)" name="ammount" scope="default" type="STRING"/>
  38. <property expression="json-eval($.accountId)" name="accountId" scope="default" type="STRING"/>
  39. <dbreport>
  40. <connection>
  41. <pool>
  42. <password>root</password>
  43. <driver>com.mysql.jdbc.Driver</driver>
  44. <url>jdbc:mysql://localhost:3306/trainingdb</url>
  45. <user>root</user>
  46. </pool>
  47. </connection>
  48. <statement>
  49. <sql><![CDATA[UPDATE accounts SET ammount = ? where accountId = ?]]></sql>
  50. <parameter expression="get-property('ammount')" type="CHAR"/>
  51. <parameter expression="get-property('accountId')" type="CHAR"/>
  52. </statement>
  53. </dbreport>
  54. <loopback/>
  55. </inSequence>
  56. <outSequence/>
  57. <faultSequence/>
  58. </resource>
  59. </api>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement