Hi
I have a GET method, which on a request performs some database operation as
a result returns a list of records, which are then converted into a list of
type JSONObject.
the calling code:
ClientResource.get("/some_query_params") I get 500 - internal error as a
response along with the following warning:
The error on the server side:
May 27, 2011 10:47:08 PM
org.restlet.ext.jaxrs.internal.util.ExceptionHandler noMessageBodyWriter
WARNING: No message body writer found for class class java.util.ArrayList,
genericType java.util.List<org.json.JSONObject>; response media type should
be: application/xml; accepted media types are: [[*/*]]
the method declaration is:
@GET
@Path("/query")
public List<JSONObject> queryUsers(@Context UriInfo queryParams){....
Is there a way to resolve this?
Presumably its not the standard way, interested in knowing if there is any
recommended alternative in such situations?
Thanks in advance,
Daku
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/Error-in-returning-a-list-on-Get-Method-tp6412562p6412562.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2750497