Guest User

Untitled

a guest
Sep 24th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.97 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <mule xmlns:ldap="http://www.mulesoft.org/schema/mule/ldap" xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:mongo="http://www.mulesoft.org/schema/mule/mongo" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:apikit="http://www.mulesoft.org/schema/mule/apikit" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
  3. http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
  4. http://www.mulesoft.org/schema/mule/apikit http://www.mulesoft.org/schema/mule/apikit/current/mule-apikit.xsd
  5. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
  6. http://www.mulesoft.org/schema/mule/mongo http://www.mulesoft.org/schema/mule/mongo/current/mule-mongo.xsd
  7. http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
  8. http://www.mulesoft.org/schema/mule/ldap http://www.mulesoft.org/schema/mule/ldap/current/mule-ldap.xsd">
  9. <http:listener-config name="web2-httpListenerConfig" host="0.0.0.0" port="8082" doc:name="HTTP Listener Configuration"/>
  10. <apikit:config name="web2-config" raml="web2.raml" consoleEnabled="false" doc:name="Router"/>
  11. <mongo:config name="Mongo_DB__Configuration" username="euclid-web-user1" password="euclid123web456" database="euclid_web" host="mongo-euclid-web-s1.dev.eba.europa.eu:27017" authenticationDatabase="admin" doc:name="Mongo DB: Configuration"/>
  12. <ldap:config name="LDAP__Configuration" authDn="CN=ldap-lookup-mdm,OU=ServiceAccounts,DC=EGATE-T,DC=LOCAL" authPassword="ok!k0Br_aSf#Fsh0L8Bj" url="ldaps://eb2ts-app14.egate-t.local:636" doc:name="LDAP: Configuration"/>
  13. <flow name="web2-main">
  14. <http:listener config-ref="web2-httpListenerConfig" path="/api/*" doc:name="HTTP"/>
  15. <apikit:router config-ref="web2-config" doc:name="APIkit Router"/>
  16. <exception-strategy ref="web2-apiKitGlobalExceptionMapping" doc:name="Reference Exception Strategy"/>
  17. </flow>
  18. <flow name="web2-console">
  19. <http:listener config-ref="web2-httpListenerConfig" path="/console/*" doc:name="HTTP"/>
  20. <apikit:console config-ref="web2-config" doc:name="APIkit Console"/>
  21. </flow>
  22. <flow name="get:/countries:web2-config">
  23. <mongo:find-documents config-ref="Mongo_DB__Configuration" collection="payment" doc:name="Mongo DB"/>
  24. <dw:transform-message doc:name="Transform Message" metadata:id="517da57f-8f6a-4b76-87fc-ea4462e438b6">
  25. <dw:input-payload mimeType="application/java" doc:sample="sample_datajson.json"/>
  26. <dw:set-payload><![CDATA[%dw 1.0
  27. %output application/json
  28. ---
  29. payload]]></dw:set-payload>
  30. </dw:transform-message>
  31. <set-payload value="#[payload]" doc:name="Set Payload"/>
  32. </flow>
  33. <apikit:mapping-exception-strategy name="web2-apiKitGlobalExceptionMapping">
  34. <apikit:mapping statusCode="404">
  35. <apikit:exception value="org.mule.module.apikit.exception.NotFoundException" />
  36. <set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
  37. <set-payload value="{ "message": "Resource not found" }" doc:name="Set Payload"/>
  38. </apikit:mapping>
  39. <apikit:mapping statusCode="405">
  40. <apikit:exception value="org.mule.module.apikit.exception.MethodNotAllowedException" />
  41. <set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
  42. <set-payload value="{ "message": "Method not allowed" }" doc:name="Set Payload"/>
  43. </apikit:mapping>
  44. <apikit:mapping statusCode="415">
  45. <apikit:exception value="org.mule.module.apikit.exception.UnsupportedMediaTypeException" />
  46. <set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
  47. <set-payload value="{ "message": "Unsupported media type" }" doc:name="Set Payload"/>
  48. </apikit:mapping>
  49. <apikit:mapping statusCode="406">
  50. <apikit:exception value="org.mule.module.apikit.exception.NotAcceptableException" />
  51. <set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
  52. <set-payload value="{ "message": "Not acceptable" }" doc:name="Set Payload"/>
  53. </apikit:mapping>
  54. <apikit:mapping statusCode="400">
  55. <apikit:exception value="org.mule.module.apikit.exception.BadRequestException" />
  56. <set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
  57. <set-payload value="{ "message": "Bad request" }" doc:name="Set Payload"/>
  58. </apikit:mapping>
  59. </apikit:mapping-exception-strategy>
  60. </mule>
Add Comment
Please, Sign In to add comment