I am trying to use WSO2-ESB to parse a text file containing web logs and put it into a database. I have imported the file using VFS. Now I need to apply smooks mediator on this input and convert into XML. Structure of the input file is as follows
64.242.88.10 - - [07/Mar/2004:16:06:51 -0800] "GET /twiki/bin/rdiff/TWiki/NewUserTemplate?rev1=1.3&rev2=1.2 HTTP/1.1" 200 4523
64.242.88.10 - - [07/Mar/2004:16:10:02 -0800] "GET /mailman/listinfo/hsdivision HTTP/1.1" 200 6291
So I need a custom mediator where in I can parse these type of input and split it at space character and convert it to XML. I know how to use smooks in WSO2 ESB to convert XML to XML, CSV to XML, etc. But I dont know how to create a custom mediator.
Is there any tutorial or link which I can refer for creating a custom mediator?