webService input list mapping

Hi,
I have a webService which accept list of input(say employee list).From CAF page at the runTime we are providing the no of records to be passed and accordingly populating the generated table input.
Now the problem is how I can bind values from CAF to input list.

Have tried with making custom code java code to set the value in input of the webService.

getInsertFile().getParameters().getInsertFile()[i].setFileName(getFileItem().getName());

But getting null pointer error as instance (i)of the getInsertFile is not generated yet.

Please let me know if you have done any binding with webService input list from CAF UI.

Thanks