Looking at the example string, I think you need a component that is capable
of parsing fixed-width records. This can be accomplished using either of the
following Camel components:

- camel-bindy (POJO based), http://camel.apache.org/bindy.html
- camel-flatpack (XML based), http://camel.apache.org/flatpack.html

Both camel components can be used with Spring XML, but flatpack also allows
your record definitions to be specified in XML.

If you need advanced data mapping capabilities you should have a look at
Smooks (http://www.smooks.org). It integrates with Camel out-of-the-box.

On Mon, Apr 4, 2011 at 10:24 AM, Muhammad Rayhan <saviour...@gmail.com>wrote:

> Hi, this is my first email to this mailing-list. Although already
> knowing for some time, I only recently got the opportunity to deploy
> integration solution using Apache Camel. And Camel did wonder! I and
> my fellow friends were amazed by the concept and simplicity of Apache
> Camel
>
> Now, I have another problem to solve using Camel. One of my tasks to
> be done is doing string processing / transformation. I need to parse
> and extract several information from a text log. The string format
> itself is fixed, but string is not in comma separated value. For
> example, the text is:
>
> 2011-04-04 14:34:05,003  INFO  - cli_to_gw submit_sm_req text ip
> :10.2.xxxxx:37xxx to:62xxxxx msg:Congratulations, the product ABC
> activation to subscriber DEF is successful. The serial number is XYZ.
> from:xxxxx
>
> I want to extract only ABC, DEF and XYZ from the text log. In order to
> avoid heavy changes in our production environment, I intend to use
> Spring XML DSL to configure my routes. Is it possible to do so? What
> functions should I use? I have no problem filtering the log to only
> process certain type of log (using 'regex' simple operator), but have
> no idea of extract those information using Spring XML.
>
> Thanks in advance :)
>
>
> --
> Twitter: @md_ray
> Email/IM: saviour...@gmail.com
>

Reply via email to