How to add the file name to objects created by Smooks splitter?

Solution Unverified - Updated -

Issue

We are using Smooks to process a csv file where each line maps to a simple object model. In addition to the input data, we need to obtain and append the following to the object model
- filename
- line number
- line length

We are using the following smooks configuration to parse the csv file:

    <csv:reader fields="firstName,lastName,gender,age,country">
        <csv:singleBinding  beanId="customerList" class="example.Customer"/>
    </csv:reader>

Environment

  • Red Hat JBoss SOA Platform
    • 5.3.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.