Skip to main content

<?xml version="1.0" encoding="UTF-8"?>

 

<mule xmlns:db="http://www.mulesoft.org/schema/mule/db" 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

http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd

http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd">

<http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config" doc:id="3e081917-1381-4106-a2fa-a9c4d8180881" >

<http:listener-connection host="0.0.0.0" port="8081" />

</http:listener-config>

<db:config name="Database_Config" doc:name="Database Config" doc:id="4be42af6-7e1c-4b97-b5ed-6718d5aaf398" >

<db:my-sql-connection host="mudb.learn.mulesoft.com" port="3306" user="mule" password="mule" database="training"/>

</db:config>

<flow name="training4-american-wsFlow" doc:id="0fe44c96-8928-4eed-83ae-937a742fc24e" >

<http:listener doc:name="Listener" doc:id="43e1d8fb-4de1-4173-8ec9-5666c480529b" config-ref="HTTP_Listener_config" path="/flights"/>

<db:select doc:name="Select" doc:id="74c0406a-9130-445f-95f5-5a4ff5b01fee" config-ref="Database_Config">

<db:sql >SELECT *

FROM american</db:sql>

</db:select>

</flow>

</mule>

12 réponses
  1. 16 janv. 2021, 09:07

    Hello @Srinivas Pachari​ ,

     

    your welcome, just for other developers I am describing the fix of your issue.

     

    1. recreated the HTTP configurations
    2. added new HTTP listener with some more configurations for response
    3. in transform message just after db connector used output application/json

     

    Thanks,

    Anurag Sharma

0/9000