Back Home

<?xml version="1.0" encoding="UTF-8"?>
 
<mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:neo4j="http://www.mulesoft.org/schema/mule/neo4j"
	xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" 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:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.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/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd
http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd
http://www.mulesoft.org/schema/mule/neo4j http://www.mulesoft.org/schema/mule/neo4j/3.4/mule-neo4j.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
 
	<http:polling-connector name="PollingHttpConnector" pollingFrequency="6000" doc:name="HTTP Polling" clientSoTimeout="10000" cookieSpec="netscape" receiveBacklog="0"
		receiveBufferSize="0" sendBufferSize="0" serverSoTimeout="10000" socketSoLinger="0" validateConnections="true">
		<reconnect />
	</http:polling-connector>
	<neo4j:config name="Neo4j" doc:name="Neo4j">
		<neo4j:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW" />
	</neo4j:config>
 
 
 
	<flow name="SkySearchFeedReaderFlow2" doc:name="SkySearchFeedReaderFlow2">
 
		<http:inbound-endpoint exchange-pattern="one-way" doc:name="Team Sky Feed" connector-ref="PollingHttpConnector" address="http://www.teamsky.com/feeds/team" />
        <splitter expression="#[xpath('//person')]" doc:name="Splitter"/>
        <scripting:component doc:name="Extract Node Attributes">
            <scripting:script engine="Groovy"><![CDATA[def data = ["surname", "forename","dateOfBirth", "nationality", "mapmytracksID" ]
def dataMap = new HashMap();
data.each{
		     dataMap.put(it, payload.element(it)?.getText())
}
return dataMap]]></scripting:script>
        </scripting:component>
        <neo4j:create-node config-ref="Neo4j" doc:name="Neo4j">
            <neo4j:properties ref="#[payload]"/>
        </neo4j:create-node>
        <logger message="Created node with id: #[groovy:payload.getId()]" level="INFO" doc:name="Logger"/>
 
	</flow>
 
</mule>
 
stretching.txt · Last modified: 2013/12/04 02:03 by root
 
RSS - 200 © CrosswireDigitialMedia Ltd