|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | + |
| 3 | +<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core" xmlns:wsc="http://www.mulesoft.org/schema/mule/wsc" |
| 4 | + xmlns:american-flights-api="http://www.mulesoft.org/schema/mule/american-flights-api" |
| 5 | + xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" 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 |
| 6 | +http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd |
| 7 | +http://www.mulesoft.org/schema/mule/american-flights-api http://www.mulesoft.org/schema/mule/american-flights-api/current/mule-american-flights-api.xsd |
| 8 | +http://www.mulesoft.org/schema/mule/wsc http://www.mulesoft.org/schema/mule/wsc/current/mule-wsc.xsd |
| 9 | +http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd"> |
| 10 | + <configuration-properties doc:name="Configuration properties" doc:id="8c9cdd94-6f21-4b4f-ab97-e29aad0baed2" file="config.yaml" /> |
| 11 | + <http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config" doc:id="a5df1eb0-4251-42de-9e1c-016a7e25c25a" > |
| 12 | + <http:listener-connection host="0.0.0.0" port="${http.port}" /> |
| 13 | + </http:listener-config> |
| 14 | + <american-flights-api:config name="American_Flights_API_Config" doc:name="American Flights API Config" doc:id="782b14ef-3f15-437d-a12b-f02b3b91eaf1" property_host="${american.host}" property_port="${american.port}" property_protocol="${american.protocol}" property_basePath="${american.basepath}"/> |
| 15 | + <http:request-config name="HTTP_Request_config_training" doc:name="HTTP Request configuration" doc:id="9d95e3b0-dd8a-4077-b04b-b59cf15fd2ce" basePath="${training.basepath}" > |
| 16 | + <http:request-connection host="${training.host}" port="${training.port}" /> |
| 17 | + </http:request-config> |
| 18 | + <wsc:config name="Delta_Web_Service_Consumer_Config" doc:name="Web Service Consumer Config" doc:id="704b5225-f6b8-4f2b-9bb5-af6b6f96a364" > |
| 19 | + <wsc:connection wsdlLocation="${delta.wsdl}" service="${delta.service}" port="${delta.port}" > |
| 20 | + <reconnection > |
| 21 | + <reconnect /> |
| 22 | + </reconnection> |
| 23 | + <wsc:web-service-security actor="http://schemas.xmlsoap.org/soap/actor/next" /> |
| 24 | + </wsc:connection> |
| 25 | + </wsc:config> |
| 26 | + <configuration doc:name="Configuration" doc:id="e2b21b57-950c-4220-8885-86bc60cb12b4" defaultErrorHandler-ref="globalError_Handler" /> |
| 27 | + <error-handler name="globalError_Handler" doc:id="d052484b-2cee-45c8-b4ce-741f24971b2f" > |
| 28 | + <on-error-continue enableNotifications="true" logException="true" doc:name="On Error Continue" doc:id="4cf10751-6c0e-424a-b267-9dd6cc3302f6" type="APP:INVALID_DESTINATION"> |
| 29 | + <ee:transform doc:name="error.description" doc:id="24c132ab-664d-4142-9f78-4c926d4f5cdc" > |
| 30 | + <ee:message > |
| 31 | + <ee:set-payload ><![CDATA[%dw 2.0 |
| 32 | +output application/json |
| 33 | +--- |
| 34 | +{ |
| 35 | + "message": error.description |
| 36 | +}]]></ee:set-payload> |
| 37 | + </ee:message> |
| 38 | + </ee:transform> |
| 39 | + <set-variable value="400" doc:name="httpStatus" doc:id="3b3e6176-df64-47a2-b839-cd06c32e1642" variableName="httpStatus"/> |
| 40 | + </on-error-continue> |
| 41 | + <on-error-continue enableNotifications="true" logException="true" doc:name="On Error Continue" doc:id="97f3a0b0-e63e-4c67-827a-45a441dc6187" type="WSC:CONNECTIVITY, WSC:INVALID_WSDL"> |
| 42 | + <ee:transform doc:name="Data unavailable" doc:id="1f17158e-15f1-41c1-9502-76bbd30097af" > |
| 43 | + <ee:message > |
| 44 | + <ee:set-payload ><![CDATA[%dw 2.0 |
| 45 | +output application/json |
| 46 | +--- |
| 47 | +{ |
| 48 | + "message": "Data unavailable. Try later. " ++ error.description as String |
| 49 | +}]]></ee:set-payload> |
| 50 | + </ee:message> |
| 51 | + </ee:transform> |
| 52 | + <set-variable value="500" doc:name="httpStatus" doc:id="9101e996-fef2-4abd-afe5-1e4f80d0aa1d" variableName="httpStatus"/> |
| 53 | + </on-error-continue> |
| 54 | + <on-error-continue enableNotifications="true" logException="true" doc:name="On Error Continue" doc:id="427ed494-100a-4ba0-a0e3-b168fe942f50" type="ANY"> |
| 55 | + <ee:transform doc:name="error.description" doc:id="20ac6986-d8a4-4f9d-b179-8c25d8c16de5"> |
| 56 | + <ee:message> |
| 57 | + <ee:set-payload><![CDATA[%dw 2.0 |
| 58 | +output application/json |
| 59 | +--- |
| 60 | +{ |
| 61 | + "message": error.description |
| 62 | +}]]></ee:set-payload> |
| 63 | + </ee:message> |
| 64 | + </ee:transform> |
| 65 | + <set-variable value="500" doc:name="httpStatus" doc:id="e723383c-7a41-4900-83a5-26a1084d0a7a" variableName="httpStatus" /> |
| 66 | + </on-error-continue> |
| 67 | + </error-handler> |
| 68 | +</mule> |
0 commit comments