wood burning stoves 2.0*
The moose likes Web Services and the fly likes RESTful Java Client - Post Data Help neede Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "RESTful Java Client - Post Data Help neede" Watch "RESTful Java Client - Post Data Help neede" New topic

RESTful Java Client - Post Data Help neede

Garaj Singh

Joined: Oct 03, 2010
Posts: 1
I am trying to learn about RESTful java client.

I have created a mysql db in my laptop and with netbeans 6.9 I am able to create a RESTful API with which I can get/put data on the web-browser.

Now,I want to use the RESTful Java Client generated by NEtbeans to insert xml data into the database.

The Netbeans generated code for the client (tweetclinet) is:

All the converter and entity classes are generated by netbeans:


I want to do something like:

When I run this I get the error,
Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class com.tweet.Tweets, and MIME media type, application/xml, was not found
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:128)
at com.sun.jersey.api.client.Client.handle(Client.java:457)

Help is very much appreciated.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990

newbie here wrote:

Please check your private messages for an important administrative matter.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link: http://aspose.com/file-tools
subject: RESTful Java Client - Post Data Help neede
Similar Threads
Generics, POJOs & JSF cuestion
Value Objects or bean is better and why ?
Speed differential between RESTFul webservices and RMI
Jersey RESTful web service - How to post XML file using jersey framework
returning a generic list from REST