Last active
August 29, 2015 14:26
-
-
Save rsogo/8c94657f5d9b170865bf to your computer and use it in GitHub Desktop.
Mule Database Connector Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<mule | |
xmlns="http://www.mulesoft.org/schema/mule/core" | |
xmlns:db="http://www.mulesoft.org/schema/mule/db" | |
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" | |
xmlns:http="http://www.mulesoft.org/schema/mule/http" | |
xmlns:json="http://www.mulesoft.org/schema/mule/json" | |
xmlns:spring="http://www.springframework.org/schema/beans" | |
xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/json | |
http://www.mulesoft.org/schema/mule/json/current/mule-json.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://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-current.xsd | |
http://www.mulesoft.org/schema/mule/core | |
http://www.mulesoft.org/schema/mule/core/current/mule.xsd | |
http://www.mulesoft.org/schema/mule/ee/tracking | |
http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd"> | |
<db:generic-config doc:name="Generic Database Configuration" driverClassName="oracle.jdbc.driver.OracleDriver" name="Oracle_Configuration" url="jdbc:oracle:thin:{User}/{Password}@localhost:1521:{SID}"/> | |
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/> | |
<flow name="database-to-jsonFlow1"> | |
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="Recieve HTTP request"/> | |
<db:select config-ref="Oracle_Configuration" doc:name="Perform a query in Database"> | |
<db:dynamic-query><![CDATA[select NAME from CHILD]]></db:dynamic-query> | |
</db:select> | |
<json:object-to-json-transformer doc:name="Convert Object to JSON"/> | |
</flow> | |
</mule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment