Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UnsupportedMediaException : Unsupported content-type:text/html;

 
Somak Dalui
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have generated the client Java files by accessing the remote WSDL file through 'wsimport' tool.
Now when I am trying to invoke the service I am getting this UnsupportedMediaException : Unsupported content-type:text/html; charset=utf-8 Supported ones are: [text/xml].

I have seen the others posts related to the same topic but are of little use to me. I dont have any kind of local WSDL file, my @WebServiceClient annotation attributes are all fine and I am just running a standalone Java class as client.

Here's my Ant wsimport task


And this is my Java client code -


Please help me on this. I can understand instead of xml what I am getting back is text/html, but have little clue how to advance further.
Let me know of you need to see more code of anything.
 
Somak Dalui
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just set this VM property to view the detailed response
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic