I understand that you want to read data from a file
To do that, you just need to declare a VFS proxy :
<proxy xmlns="http://ws.apache.org/ns/synapse" name="IncomingFile" transports="vfs" statistics="disable" trace="disable" startOnLoad="true">
<target inSequence="YourSequence" />
<parameter name="transport.PollInterval">15</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.FileURI">file:///Your_directory</parameter>
<parameter name="transport.vfs.MoveAfterProcess">file:///Your_directory_OK</parameter>
<parameter name="transport.vfs.MoveAfterFailure">file:///Your_directory_KOKO</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.txt</parameter>
<parameter name="transport.vfs.ContentType">text/plain; charset=ISO-8859-1</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
</proxy>
Don't forget to enable VFS transport receiver in you repository/conf/axis2/axis2.xml :
<transportReceiver name="vfs" class="org.apache.synapse.transport.vfs.VFSTransportListener"/>
The message builder associated with text/plain in your axis2 conf will be used to build the message (org.apache.axis2.format.PlainTextBuilder by default : text content will be encapsulated into an xml node)
You may want to develop and use your own message builder, in order to transform the particular file format into a specific xml tree in order to use XPath inside your mediation.
An alternative would be to use smooks.