users@jersey.java.net

Jersey Client, POST JSONObject issue.

From: Scott Glass <scott.glass_at_gmail.com>
Date: Mon, 28 Jun 2010 15:04:48 -0400

I'm trying to POST a JSONObject using the Jersey Client to a URL and am
getting the following message from the service....

com.sun.jersey.api.client.ClientHandlerException: A message body writer for
Java type, class org.codehaus.jettison.json.JSONObject, and MIME media type,
application/json, was not found

This is with Jersey 1.3 and the class loader hack in place.

Any ideas, I searched the documentation online found this, but it's throwing
an exception...

config.getClasses().add(JSONRootElementProvider.class);

http://blogs.sun.com/enterprisetechtips/entry/consuming_restful_web_services_with

Thanks,
Scott


-- 
Scott Glass