Skip to content

XML Configuration Example

assimbly edited this page Jul 11, 2018 · 10 revisions
<?xml version="1.0" encoding="UTF-8"?>
<connectors>
	<connector>
		<id>example</id>
		<flows>

			<!-- FILE Producer Examples -->

			<!-- example file to wastebin -->
			<flow>
				<id>1</id>
							<name>exampe.filetowastebin</name>
				<from>
					<uri>file://C:/Test1</uri>
				</from>
				<to>
					<uri>wastebin</uri>
				</to>	
			</flow>
			
			<!-- example file to file --> 		
			<flow>
				<id>2</id>
							<name>example.filetofile</name>			
							<from>
					<uri>file://C:/Test1</uri>
				</from>
				<to>
					<uri>file://C:/Test2</uri>
				</to>
			</flow>

			<!-- example file to streamm (prints message) --> 		
			<flow>
				<id>3</id>
							<name>example.filetofile</name>			
							<from>
					<uri>file://C:/Test1</uri>
				</from>
				<to>
					<uri>stream:out</uri>
				</to>
			</flow>

			<!-- example file to sonicmq --> 		
			<flow>
				<id>4</id>
							<name>example.filetosonicmq</name>
				<from>
					<uri>file://C:/Test1</uri>
				</from>
				<to>
					<uri>sonicmq:Sample.Q1</uri>
					<options>
						<jmsMessageType>text</jmsMessageType>
					</options>
					<service_id>1</service_id>
				</to>
				<error>
					<uri>file://C:/Test2</uri>
				</error>
			</flow>

			<!-- example file to sftp  -->
			<flow>
				<id>5</id>
							<name>example.filetosftp</name>
				<from>
					<uri>file://C:/Test1</uri>
				</from>			
				<to>
					<uri>sftp://username@server/directory</uri>
					<options>
						<password>secret</password>
					</options>
				</to>	
			</flow>

			<!-- example file to sql  -->
			<flow>
				<id>6</id>
							<name>example.filetosql</name>
				<from>
					<uri>file://C:/Test1</uri>
				</from>			
				<to>
					<uri>sql:insert into history (MESSAGE,`DATE`,MESSAGE_ID,TYPE) values (:#message,:#date,:#message_id,:#type)</uri>
					<options>
						<dataSource>test.db</dataSource>					
					</options>
					<service_id>2</service_id>
					<header_id>45</header_id>
				</to>	
			</flow>
						
		</flows>
		
		<!-- services with for example connections with a MQ or a database -->
		<services>
			<service>
				<id>1</id>
                                <name>local.mgmt</name>
				<username>Administrator</username>
				<password>Administrator</password>
				<url>tcp://localhost:2506</url>
			</service>
			
			<service>
                                <id>2</id>
				<name>test.db</name>
				<username>username</username>
				<password>example</password>
				<url>jdbc:mysql://localhost/dbname</url>
				<driver>com.mysql.jdbc.Driver</driver>
			</service>		
		</services>
		
		<!-- headers -->
		<headers>
			<header>
                                <id>45</id>
				<name>mapper</name>
				<x type="constant">y</x>
				<message type="xpath">/root/message/text()</message>
				<date type="xpath">/root/date/text()</date>
				<message_id type="xpath">/root/message_id/text()</message_id>
				<type type="xpath">/root/type/text()</type>
			</header>
		</headers>
			
	</connector>
</connectors>
Clone this wiki locally