Error handling using JAX-RS 1.0

whereever I have searched on how to show server side custom error message beside the fields in form; I have found that I need status = -1 and data attribute set as error message in response object.

I am using JAX-RS 1.0 api to implement restful webservices and restdatasource operation binding for add, delete, fetch and update operations. Nowhere, I have found in JAX-RS api that I can create a response object having status as error code and data as error string.
I am using ResponseBuilder class.

did I miss something? any idea on how to get this done or any information required from my side.

No idea about your issue with JAX-RS, but if you can get the error message into the response somehow, you can always override transformResponse and grab the error message from wherever it is in the message, via XMLTools.selectString. See this sample.