Sinks

The fileSink writes the messages it receives on the local file system.

Parameters :

type fileSink
filePath Directory where to save files.
fileName Name of the file to create
addTimestamp "y" or "n"
If set to "y", a timestamp will be added before the extension of the filename
(ex : bogus20030807110433967000.txt)
writeMethod "overwrite" or "append".
If not set, defaults to overwrite.
fileType "flat" or "xml".
If not set, defaults to flat.
This parameter is important if writeMethod is set to "append".
Obviously, appending to an XML file requires some manipulations in order to have a valid file, instead of appending to a flat file (which is simple).

 

 

 

The ftpSink component stores data to a remote file system, accessed via FTP.

Parameters :

type ftpSink
filePath Directory where to store files.
fileName The name says it all ;o)
addTimestamp "y" or "n"
If set to "y", a timestamp will be added before the extension of the filename
(ex : bogus20030807110433967000.txt)
ftpHost URL or IP adress of the FTP server
ftpPort Port of the FTP server (if empty, 21 will be used by default)
ftpUser User for FTP connection
ftpPass Password for FTP connection

 

 

The ftpSink component stores data to a remote file system, accessed via FTP.

Parameters :

type SMTPSink
SMTPServer Adress of the SMTP Server
SMTPPort Port of the SMTP Server (if empty, 25 will be used)
SMTPUser User if your SMTP server requires authentication
SMTPPass Password if your SMTP server requires authentication
from Email adress for reply
to Recipients of the mail (if multiple => separate with ",")
cc Secondary recipients (if multiple => separate with ",")
subject Subject of the mail
headText Text that will be placed before the message (whether it is passed as an attachment or not)
tailText Text that will be placed after the message (whether it is passed as an attachment or not)
asAttachment "y" or "n"
If set to yes, the input message of the sink will be passed as an attachment in the mail, if not, it will be fully displayed in the body of the mail, between headText and tailText.
attachmentName Name of the attachment (ex : bogus.txt)
mimeType MIME type of the attachment (ex : text/html)

 

 

 

The SQLSink permits to generate Update or Insert statements from an XML source (Select statements are useless).
The XML input data must look like what the SQLSource outputs :

<?xml version="1.0" encoding="UTF-8">
<rootTag>
+++<recTag>
+++
+++<field1>value1</field1>
+++
+++<field2>value2</field2>
+++
+++<field3>value3</field3>
+++
+++<field4>value4</field4>
+++
+++<field5>value5</field5>
+++</recTag>
+++<recTag>
+++
+++<field1>value6</field1>
+++
+++<field2>value7</field2>
+++
+++<field3>value8</field3>
+++
+++<field4>value9</field4>
+++
+++<field5>value10</field5>
+++</recTag>
+++<recTag>
+++
+++<field1>value11</field1>
+++
+++...
+++
+++...
</rootTag>

If you want to use the values contained in the XML input you must use the tag names with a preceding $ :
INSERT INTO TABLE1 VALUES('$field1','$field2','$field3','$field4',0)

An SQL statement will be generated and executed for each recTag (rootTag and recTag might be named as you want, since they aren't of any use - unless for structure needs).
This sink uses a multithreading architecture in order to speed up statements execution (parallel execution). You can specify how many threads you want to use.

Parameters :

type SQLSink
SQL SQL Statement to be mapped to the XML input file
dbType

Retic

odbc
mysql
dcoracle2
sybase
mxodbc

JyRetic

The JDBC driver of your database (for example : com.mysql.jdbc.Driver)

dsn

Retic

server/connection name


JyRetic

The JDBC URL (for ex : jdbc:mysql://localhost/xpweb3)

user Login to connect to db
password Password to connect to db
nbThreads How many threads to process SQL statements in parallel (Statements are divided in [almost] equal parts between the threads)
replaceEmptyFieldBy Value to put by default if the input field is empty (ex : null)

 

 

Jabber is an open source IM protocol (like ICQ, AIM, etc...). See http://www.jabber.org for more information.
This components permits to send messages to Jabber users.
Prior to using it, a user must be registered into your Jabber server in order to be able to send messages.

Parameters :

type jabberSink
server Jabber Server to connect to (user for the connection and destination user of the message must be on the same server)
user User to connect to the server and send the message
password Password for the user used to send the message
destUser User that will receive the message (don't put @serverName, it will be added automatically)

 

 

 

This component permits to call an HTTP url with parameters, either with the Post or the Get method. The parameters are taken from the incoming XML message, which must look like this :

<?xml version="1.0" encoding="UTF-8">
<rootTag>
+++<recTag>
+++ +++<field1>value1</field1>
+++ +++<field2>value2</field2>
+++ +++<field3>value3</field3>
+++ +++<field4>value4</field4>
+++ +++<field5>value5</field5>
+++</recTag>
+++<recTag>
+++ +++<field1>value6</field1>
+++ +++<field2>value7</field2>
+++ +++<field3>value8</field3>
+++ +++<field4>value9</field4>
+++ +++<field5>value10</field5>
+++</recTag>
</rootTag>

For each recTag (the name of that tag or even the one of the root tag don't matter), the url will be called once, passing it as parameters the values found in the XML input. For the example above, it gives (considering that we use the Get method) :

http://www.url.com:port/blablbal?field1=value1&field2=value2&field3=value3&field4=value4&field5=value5
http://www.url.com:port/blablbal?field1=value6&field2=value7&field3=value8&field4=value9&field5=value10

Parameters :

type httpSink
host HTTP Host to connect to must be formatted this way : www.foo.com or an IP adress (194.214.200.109).
Don't put any http:// or anything after it.
port Port to connect to.
url Url to concatenate to the host and port (ex : /cgi-bin/query)
method Either get or post (case insensitive)
exitOnHTTPError y or n.
Permits to stop the adaptor if the HTTP server doesn't reply a 200 (OK).

 

 

 

 

Xindice is the free XML Native database of the Apache foundation.
The Retic version of this sink uses the XMLRPC interface to store documents into the Xindice server.
The JyRetic version of this sink uses the XML:DB Java API to store documents into the Xindice server.

Here's an example of config file :

<sink name="XindiceSink2" type="XindiceSink" url="http://194.214.207.44:4080" db="/db/retic" fileName="reticAdaptor.xml" addTimestamp="y" />

Parameters :

type XindiceSink
url Retic

HTTP URL of the XMLRPC Handler of the Xindice server
Example : http://host:4080

JyRetic

XML:DB URL of the Xindice server
Example : xmldb:xindice://localhost:4080

db Database where the data will be stored
fileName Name of the file that will be created (can be left empty. Xindice will automatically put it a unique name)
addTimestamp "y" or "n"
If set to y, will add a timestamp to the before the extension of the fileName.

 

 

 

This sink permits to publish messages on a xmlBlaster Topic.
Here's what it looks like in the XML config file :

<sink name="xmlBlasterSink2" type="xmlBlasterSink" url="http://192.168.185.206:8080" user="adi" password="pass" key="&lt;key oid=''&gt;&lt;testXmlBlSink&gt;&lt;/testXmlBlSink&gt;&lt;/key&gt;" qos="&lt;qos&gt;&lt;/qos&gt;" />

Parameters :

type xmlBlasterSink
user Login to connect to xmlBlaster server
password Password to connect to xmlBlaster server

url

url of the XMLRPC listener of the xmlBlaster server
key xmlBlaster key for the request (see xmlBlaster docs for more info about this)
qos xmlBlaster qos for the request (see xmlBlaster docs for more info about this)

 

 


This component permits to send text messages to JMS compliant MOMs.
Both queue and topic modes are supported.

Parameters :

type JMSSource
jndiFactory JNDI Factory (ex : com.sun.jndi.fscontext.RefFSContextFactory )
jmsFactory JMS Factory (ex : JmsTopicConnectionFactory )
queueName Queue or Topic name
providerUrl URL of the JMS Provider (ex : rmi://localhost:1099/ )
deliveryMode "persistent" or "nonpersistent"
mode "queue" or "topic"
lifespan Time until the message gets erased (if not retrieved by subscribers) in milliseconds
username Username for the JMS provider connection
password password for the JMS provider connection
bridgeUrl URL of the XMLRPC JMS Bridge (useless in JyRetic)
bridgePort Port on which the listen part of the XMLRPC JMS Bridge is started (useless in JyRetic)

 

In topic mode, properties can be added to messages. To do this, you must use the <params> and <param> tags in your config files.

For example :

<sink name="JMSSink" type="JMSSink" bridgePort="9991 " polls="1" jndiFactory="org.exolab.jms.jndi.InitialContextFactory" bridgeUrl="http://localhost" providerUrl="rmi://localhost:1099/" jmsFactory="JmsTopicConnectionFactory" queueName="topic1" pollPeriod="1" mode="topic" deliveryMode="persistent" lifespan="0" priority="default">
+++<params>
++++++<param name="property1" type="int" value="1"/>
++++++<param name="property2" type="string" value="bla"/>
+++</params>
</sink>

Here the messages will be set with the 2 properties :

  • property1 which is an integer and takes the value "1"

  • property2 which is a string and takes the value "bla"