Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <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
- http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
- http://www.mulesoft.org/schema/mule/apikit http://www.mulesoft.org/schema/mule/apikit/current/mule-apikit.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
- http://www.mulesoft.org/schema/mule/mongo http://www.mulesoft.org/schema/mule/mongo/current/mule-mongo.xsd
- http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
- http://www.mulesoft.org/schema/mule/ldap http://www.mulesoft.org/schema/mule/ldap/current/mule-ldap.xsd">
- <http:listener-config name="web2-httpListenerConfig" host="0.0.0.0" port="8082" doc:name="HTTP Listener Configuration"/>
- <apikit:config name="web2-config" raml="web2.raml" consoleEnabled="false" doc:name="Router"/>
- <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"/>
- <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"/>
- <flow name="web2-main">
- <http:listener config-ref="web2-httpListenerConfig" path="/api/*" doc:name="HTTP"/>
- <apikit:router config-ref="web2-config" doc:name="APIkit Router"/>
- <exception-strategy ref="web2-apiKitGlobalExceptionMapping" doc:name="Reference Exception Strategy"/>
- </flow>
- <flow name="web2-console">
- <http:listener config-ref="web2-httpListenerConfig" path="/console/*" doc:name="HTTP"/>
- <apikit:console config-ref="web2-config" doc:name="APIkit Console"/>
- </flow>
- <flow name="get:/countries:web2-config">
- <mongo:find-documents config-ref="Mongo_DB__Configuration" collection="payment" doc:name="Mongo DB"/>
- <dw:transform-message doc:name="Transform Message" metadata:id="517da57f-8f6a-4b76-87fc-ea4462e438b6">
- <dw:input-payload mimeType="application/java" doc:sample="sample_datajson.json"/>
- <dw:set-payload><![CDATA[%dw 1.0
- %output application/json
- ---
- payload]]></dw:set-payload>
- </dw:transform-message>
- <set-payload value="#[payload]" doc:name="Set Payload"/>
- </flow>
- <apikit:mapping-exception-strategy name="web2-apiKitGlobalExceptionMapping">
- <apikit:mapping statusCode="404">
- <apikit:exception value="org.mule.module.apikit.exception.NotFoundException" />
- <set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
- <set-payload value="{ "message": "Resource not found" }" doc:name="Set Payload"/>
- </apikit:mapping>
- <apikit:mapping statusCode="405">
- <apikit:exception value="org.mule.module.apikit.exception.MethodNotAllowedException" />
- <set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
- <set-payload value="{ "message": "Method not allowed" }" doc:name="Set Payload"/>
- </apikit:mapping>
- <apikit:mapping statusCode="415">
- <apikit:exception value="org.mule.module.apikit.exception.UnsupportedMediaTypeException" />
- <set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
- <set-payload value="{ "message": "Unsupported media type" }" doc:name="Set Payload"/>
- </apikit:mapping>
- <apikit:mapping statusCode="406">
- <apikit:exception value="org.mule.module.apikit.exception.NotAcceptableException" />
- <set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
- <set-payload value="{ "message": "Not acceptable" }" doc:name="Set Payload"/>
- </apikit:mapping>
- <apikit:mapping statusCode="400">
- <apikit:exception value="org.mule.module.apikit.exception.BadRequestException" />
- <set-property propertyName="Content-Type" value="application/json" doc:name="Property"/>
- <set-payload value="{ "message": "Bad request" }" doc:name="Set Payload"/>
- </apikit:mapping>
- </apikit:mapping-exception-strategy>
- </mule>
Add Comment
Please, Sign In to add comment