-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmy-app.xml
More file actions
47 lines (45 loc) · 3.98 KB
/
my-app.xml
File metadata and controls
47 lines (45 loc) · 3.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ws="http://www.mulesoft.org/schema/mule/ws" xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns:secure-property-placeholder="http://www.mulesoft.org/schema/mule/secure-property-placeholder" xmlns:batch="http://www.mulesoft.org/schema/mule/batch" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:sfdc="http://www.mulesoft.org/schema/mule/sfdc" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="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/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/batch http://www.mulesoft.org/schema/mule/batch/current/mule-batch.xsd
http://www.mulesoft.org/schema/mule/sfdc http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd
http://www.mulesoft.org/schema/mule/secure-property-placeholder http://www.mulesoft.org/schema/mule/secure-property-placeholder/current/mule-secure-property-placeholder.xsd
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/ws http://www.mulesoft.org/schema/mule/ws/current/mule-ws.xsd">
<ws:consumer-config name="Web_Service_Consumer" wsdlLocation="http://www.webservicex.net/geoipservice.asmx?wsdl" service="GeoIPService" port="GeoIPServiceSoap12" serviceAddress="http://www.webservicex.net/geoipservice.asmx" doc:name="Web Service Consumer"/>
<data-mapper:config name="Xml_GetGeoIPResponse__To_JSON" transformationGraphPath="xml_getgeoipresponse__to_json.grf" doc:name="Xml_GetGeoIPResponse__To_JSON"/>
<batch:job name="my-appBatch1">
<batch:threading-profile poolExhaustedAction="WAIT"/>
<batch:input>
<sfdc:query config-ref="Salesforce" doc:name="Salesforce" query="dsql:SELECT Email,LastName,Name FROM User"/>
</batch:input>
<batch:process-records>
<batch:step name="Batch_Step">
<logger level="INFO" doc:name="Logger"/>
<db:insert config-ref="MySQL_Configuration" doc:name="Database">
<db:parameterized-query><![CDATA[INSERT into Users (Name, LastName, Email) Values (#[payload.Name], #[payload.LastName], #[payload.Email])]]></db:parameterized-query>
</db:insert>
<logger level="INFO" doc:name="Logger"/>
</batch:step>
</batch:process-records>
<batch:on-complete>
<db:select config-ref="MySQL_Configuration" doc:name="Database">
<db:parameterized-query><![CDATA[SELECT * FROM Users WHERE Name = 'Kit Wong']]></db:parameterized-query>
</db:select>
<logger level="INFO" doc:name="Logger"/>
</batch:on-complete>
</batch:job>
<flow name="my-appFlow1" doc:name="my-appFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
<ws:consumer config-ref="Web_Service_Consumer" operation="GetGeoIPContext" doc:name="Web Service Consumer"/>
<data-mapper:transform config-ref="Xml_GetGeoIPResponse__To_JSON" doc:name="Xml<GetGeoIPResponse> To JSON"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
<logger level="INFO" doc:name="Logger"/>
</flow>
</mule>