Hi Mani,
Adding more on Piyas Das's inputs, please make sure,when you are creating a REST wrapper on top of EJB Session bean, make sure you have a proper data object response structure associated with that helper class such that it can easily get captured on the UI via an AJAX Call.
Doing this would ensure that data is always captured in the case of single or multiple returns.
Thanks,
Arun