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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content