Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RESTful Java Client - Post Data Help neede

 
Garaj Singh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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:

TweetsConverter.java
------------------------



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
Posts: 11092
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
newbie here wrote:

Please check your private messages for an important administrative matter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic