JSONOBbject を inputData のように PUT しようとすると、次の例外が発生します: { "key1":"value1", "key2":"value2" }
コードスニペット:
WebResource webResource = client
.resource(url);
response = webResource.type(MediaType.APPLICATION_JSON_TYPE)
.put(ClientResponse.class,inputData);
例外:
com.sun.jersey.api.client.ClientHandlerException: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class org.json.JSONObject, and MIME media type, application/json, was not found
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
at com.sun.jersey.api.client.Client.handle(Client.java:648)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:670)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.put(WebResource.java:533)
at httptransaction.CommonHttpClient.doPutConnect(CommonHttpClient.java:222)
解決策の指針はありますか?